]> git.proxmox.com Git - pve-container.git/commitdiff
vzdump: fix passing mountpoints for the PBS case
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 9 Jul 2020 16:05:20 +0000 (18:05 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 9 Jul 2020 16:05:22 +0000 (18:05 +0200)
The stop-mode case only worked by luck as then $snapdir == $rootdir.
But for snapshots we rsync over a clean state to a separate
directory, so this has to be used as base for the backup (just like
tar does).

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/VZDump/LXC.pm

index 29e19826be430163d757bcd90d952a4a001a34d8..5038d3a3d03d70545de9b1911763562a9e48a8e7 100644 (file)
@@ -364,7 +364,7 @@ sub archive {
 
     if ($self->{vzdump}->{opts}->{pbs}) {
 
-       my $rootdir = $default_mount_point;
+       my $rootdir = $snapdir;
        my $param = [];
 
        push @$param, "pct.conf:$tmpdir/etc/vzdump/pct.conf";
@@ -376,8 +376,8 @@ sub archive {
 
        push @$param, "root.pxar:$rootdir";
 
-       foreach my $disk (@$disks) {
-           push @$param, '--include-dev', $disk->{dir};
+       foreach my $disk (@sources) {
+           push @$param, '--include-dev', "$snapdir/$disk";
        }
 
        push @$param, '--skip-lost-and-found' if $userns_cmd;