]> git.proxmox.com Git - pve-container.git/commitdiff
vzdump: use --anchored on tar
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 25 Nov 2015 14:25:13 +0000 (15:25 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 26 Nov 2015 11:17:30 +0000 (12:17 +0100)
rsync treats --exclude as anchored when they start with
a slash which they do, and which is our desired behavior,
so we should also include --anchored for our tar command.

src/PVE/VZDump/LXC.pm

index 2c559dbb10de438c48901045bb86f22b86aa92d4..491ca6ac99665f0f760f193aec97633c89c5f170 100644 (file)
@@ -316,6 +316,7 @@ sub archive {
     push @$tar, "--directory=$tmpdir", './etc/vzdump/pct.conf';
     push @$tar, "./etc/vzdump/pct.fw" if $task->{fw};
     push @$tar, "--directory=$snapdir";
+    push @$tar, '--anchored';
     push @$tar, map { "--exclude=.$_" } @{$self->{vzdump}->{findexcl}};
 
     push @$tar, @sources;