[pve-devel] [RFC pve-container] Do not abort a backup when detecting a mountpoint, but give a warning

Emmanuel Kasper e.kasper at proxmox.com
Tue Sep 1 16:06:57 CEST 2015

At the momment we abort the vzdump backup of a container which contain
mount points.

IIRC Currently mount points won't be backed up because:

A) we call the tar command with --on-filesystem option ( this will exclude: mp0: /home,mp=/home bind mounts ) and

B) PVE::LXC::attach_loops works with $diskinfo->{volid} (this will exclude the other mount point syntax mp1: local:102/vm-103-disk-3.raw,mp=/mnt)

Since it is better to backup at least the rootfs instead of nothing,
I propose to turn the error to a warning.

Besides that it could be that not doing a backup of a mount point *is* actually the desired behaviour: if you're doing a bind mount from a host directory inside
the guest, you maybe don't want vzdump to tar the whole NFS export you're passing.
 src/PVE/VZDump/LXC.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/VZDump/LXC.pm b/src/PVE/VZDump/LXC.pm
index 4015f99..0d6254a 100644
--- a/src/PVE/VZDump/LXC.pm
+++ b/src/PVE/VZDump/LXC.pm
@@ -87,7 +87,7 @@ sub prepare {
 	return if $ms eq 'rootfs';
 	# TODO: implement support for mountpoints
-	die "unable to backup mountpoint '$ms' - feature not implemented\n";
+	warn "unable to backup mountpoint '$ms' - feature not implemented\n";
     my $running = PVE::LXC::check_running($vmid);

More information about the pve-devel mailing list