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.lampre...@proxmox.com>
---
 src/PVE/VZDump/LXC.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/PVE/VZDump/LXC.pm b/src/PVE/VZDump/LXC.pm
index 29e1982..5038d3a 100644
--- a/src/PVE/VZDump/LXC.pm
+++ b/src/PVE/VZDump/LXC.pm
@@ -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;
-- 
2.20.1



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to