vzdump --exclude-path for VM not supported, any alternatives?

maddingamer

New Member
Sep 17, 2021
2
0
1
I wanted to backup some VMs but exclude the /var/www/ directory, as it is saved via other method and quite large.
With VZDump the parameter --exclude-path is only supported within containers, but are there any alternatives or similar ways for VMs?

Thanks in advance!
 
I don't think there are any parameters that can accomplish this as the host can't simply access directories of a VM like it can a container. One workaround that I can think of is to add another virtual drive to VM and mount /var/www/ on this. Then you can exclude the drive from the backup. From the GUI, this is done by unchecking the "Backup" option in the Add/Edit hard disk menu.
 
  • Like
Reactions: maddingamer
I don't think there are any parameters that can accomplish this as the host can't simply access directories of a VM like it can a container. One workaround that I can think of is to add another virtual drive to VM and mount /var/www/ on this. Then you can exclude the drive from the backup. From the GUI, this is done by unchecking the "Backup" option in the Add/Edit hard disk menu.
Ah yes that makes absolutely sense.
I'll see if switching to lxc would be possible, or backing up only the necessary configs via other method.
Thanks!