]> git.proxmox.com Git - pve-container.git/commitdiff
vzdump: exclude lost+found with unprivilged containers
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 25 Nov 2015 14:25:15 +0000 (15:25 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 26 Nov 2015 11:19:34 +0000 (12:19 +0100)
The lost+found directory is created by mkfs and fsck with
the absolute numeric owner of 0:0 which causes tar on an
unprivileged container to error when trying to read it, so
it needs to be excluded un-anchored.
This doesn't need to be done for rsync as rsync runs as
privileged root.

src/PVE/VZDump/LXC.pm

index 491ca6ac99665f0f760f193aec97633c89c5f170..6d50ca253b405d9fdde82f98ff6eab21533df5a7 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, '--no-anchored', '--exclude=lost+found' if $userns_cmd;
     push @$tar, '--anchored';
     push @$tar, map { "--exclude=.$_" } @{$self->{vzdump}->{findexcl}};