The .zfs snapdir is normally hidden, but when it is set to 'visible' we back it up. On restore vzdump try to write .zfs dir what is always read only. --- src/PVE/VZDump/LXC.pm | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/src/PVE/VZDump/LXC.pm b/src/PVE/VZDump/LXC.pm index 45a851c..ccf192f 100644 --- a/src/PVE/VZDump/LXC.pm +++ b/src/PVE/VZDump/LXC.pm @@ -35,6 +35,9 @@ my $rsync_vm = sub { push @$rsync, map { "--exclude=$_" } @{$self->{vzdump}->{findexcl}}; push @$rsync, map { "--exclude=$_" } @{$task->{exclude_dirs}}; + # exclude snapdir if it is enabled + push @$rsync, "--exclude=/./zfs"; + my $starttime = time(); # See the rsync(1) manpage for --relative in conjunction with /./ in paths. # This is the only way to have exclude-dirs work together with the @@ -48,6 +51,7 @@ my $rsync_vm = sub { foreach my $disk (@$disks) { push @$rsync, "$from/.$disk->{mp}"; } + $self->cmd([@$rsync, $to]); my $delay = time () - $starttime; @@ -351,6 +355,9 @@ sub archive { push @$tar, '--anchored'; push @$tar, map { "--exclude=.$_" } @{$self->{vzdump}->{findexcl}}; + # exclude snapdir if it is enabled + push @$tar, "--exclude=./.zfs"; + push @$tar, @sources; my $cmd = [ $tar ]; -- 2.11.0 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel