[pve-devel] [RFC PATCH vzdump] Allow vzdump to see renamed backups files
Timofey Titovets
nefelim4ag at gmail.com
Thu Mar 23 14:03:13 CET 2017
Allow vzdump to see renamed backups files with additional info before
file extension
Like:
vzdump-lxc-105-2016_10_12-11_04_43.pool_name.vm_name.tar.lzo
This can address issue: https://bugzilla.proxmox.com/show_bug.cgi?id=438
Signed-off-by: Timofey Titovets <nefelim4ag at gmail.com>
---
PVE/VZDump.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
index 0bd942b..c856f64 100644
--- a/PVE/VZDump.pm
+++ b/PVE/VZDump.pm
@@ -740,7 +740,7 @@ sub get_backup_file_list {
my $bklist = [];
foreach my $fn (<$dir/${bkname}-*>) {
next if $exclude_fn && $fn eq $exclude_fn;
- if ($fn =~ m!/(${bkname}-(\d{4})_(\d{2})_(\d{2})-(\d{2})_(\d{2})_(\d{2})\.(tgz|((tar|vma)(\.(gz|lzo))?)))$!)
{
+ if ($fn =~ m!/(${bkname}-(\d{4})_(\d{2})_(\d{2})-(\d{2})_(\d{2})_(\d{2})\..*(tgz|((tar|vma)(\.(gz|lzo))?)))$!)
{
$fn = "$dir/$1"; # untaint
my $t = timelocal ($7, $6, $5, $4, $3 - 1, $2 - 1900);
push @$bklist, [$fn, $t];
--
2.12.1
P.S. Link to patch:
https://github.com/Nefelim4ag/pve-manager/commit/8e260b8964a5306dfb21d3a093be46e52a79c3ce
--
Have a nice day,
Timofey.
More information about the pve-devel
mailing list