[SOLVED] vzdump vm excluding disks

Lucas Rey

Well-Known Member
May 18, 2018
40
26
58
52
Hello community,
I'm a new Proxmox user and I'm experimenting in a test environment (an old PC :) ), all is fine till now but I have a problem with VM vzdump backup.
I installed FreeNAS/TrueNAS and directly attached 4 4TB disks for the storage. When I try to make backup, it dumps all the disks so the final bck file reach the 12 TB !!!
Is there a way to setting a vzdump excluding the specific disks?

Thank you
 
Damn! Find it myself, just added backup=0 into VM configuration: /etc/pve/qemu-server/100.conf
Like:
scsi1: /dev/disk/by-id/ata-ST4000VX000-XXXXXX_SXXXXXX,backup=0,size=3953514584K

Sorry for wasting forum space! :)
 
Sorry for wasting forum space!
no need to apologize ! - Thanks for sharing your findings - This will surely help other users wo run into this issue as well!

For the next time: please mark the thread as 'SOLVED' - this helps in seeing where someone already has the answer they were looking for!
Thanks!
 
Damn! Find it myself, just added backup=0 into VM configuration: /etc/pve/qemu-server/100.conf
Like:
scsi1: /dev/disk/by-id/ata-ST4000VX000-XXXXXX_SXXXXXX,backup=0,size=3953514584K

Sorry for wasting forum space! :)
Thanks for this! It was a big help.
 
  • Like
Reactions: ytd123
Glad to be helpful, however you can exclude disk from backup job also from GUI. Go to VM, under "hardware" section, double click on disk you have to exclude. Now deselect BACKUP and the disk will be excluded from backup job.
So you can... I can't believe I didn't think to try that. I guess I'd spent so long staring at 3 consoles that my brain started to dissolve. Thanks again!
 
This is exactly what I am facing!

But how about the restore part? Have you tried restore a excluded-hdd dump? I saw some discussion saying it will wipe everything on the excluded hdd as the backup system thinks it's "empty".
 
But how about the restore part? Have you tried restore a excluded-hdd dump? I saw some discussion saying it will wipe everything on the excluded hdd as the backup system thinks it's "empty".
Why don't you just try it out with a test machine instead of relying on probably outdated information on the internet?
 
Why don't you say you have an answer or not?
I tried to get you to the get the answer yourself.

Yet back to your question: I just tried and now I have the answer: At least in the version I tried, the disk that was not backed up is still there and was not deleted. I had to manually attach it again to the VM prior to start in order to have it available. Files on the disk are still intact and in the last state.
 
Last edited:
Hi,
This is exactly what I am facing!

But how about the restore part? Have you tried restore a excluded-hdd dump? I saw some discussion saying it will wipe everything on the excluded hdd as the backup system thinks it's "empty".
for containers, owned mount point volumes are deleted during a restore with the same guest ID. This does not include bind mounts or device mounts.

For VMs, only owned disks that are included in the backup (based on the controller/bus e.g. scsi0) are deleted during a restore with the same guest ID. Others will be kept as unused disks.
 
I tried to get you to the get the answer yourself.

Yet back to your question: I just tried and now I have the answer: At least in the version I tried, the disk that was not backed up is still there and was not deleted. I had to manually attach it again to the VM prior to start in order to have it available. Files on the disk are still intact and in the last state.

Your sharing is helpful.
As I don't have extra hdd to test passthrough behaviour on a test machine as you suggested, I tested on my running vm (PVE 8) and can confirm the data on the excluded passthrough disks won't be erased by the restore process itself.
But I do find that the restore doesn't honor the hdd passthrough settings (although can be read in the config of the backup, but nothing in the hardware tap after restore). So, after restoration, if someone doesn't passthrough the hdd to a 'sensitive' os like Synology IN THE EXTACTLY SAME MANNER, the system won't recognize the raid and will ask the user to erase the disk and rebuid.
 
Last edited:
Hi,

for containers, owned mount point volumes are deleted during a restore with the same guest ID. This does not include bind mounts or device mounts.

For VMs, only owned disks that are included in the backup (based on the controller/bus e.g. scsi0) are deleted during a restore with the same guest ID. Others will be kept as unused disks.

Thanks for your input. For non-geek guy like me I am heading to Google to figure out what's bind mounts and device mounts.
That's one reason why I incline to use vm than container - 'vm passthrough' settings are a bit more intuitive than 'container grant access' settings. Maybe it's only me.
 
Your sharing is helpful.
As I don't have extra hdd to test passthrough behaviour on a test machine as you suggested, I tested on my running vm (PVE 8) and can confirm the data on the excluded passthrough disks won't be erased by the restore process itself.
But I do find that the restore doesn't honor the hdd passthrough settings (although can be read in the config of the backup, but nothing in the hardware tap after restore). So, after restoration, if someone doesn't passthrough the hdd to a 'sensitive' os like Synology IN THE EXTACTLY SAME MANNER, the system won't recognize the raid and will ask the user to erase the disk and rebuid.
This is the first time you say passthrough ... of course it's different. Normally, you don't passthrough. The point of virtualization is ... virtualizing stuff, so you don't passthrough anything. AFAIK, passthrough cannot be configured via GUI and is therefore not visible there after restore.
 
Glad to be helpful, however you can exclude disk from backup job also from GUI. Go to VM, under "hardware" section, double click on disk you have to exclude. Now deselect BACKUP and the disk will be excluded from backup job.
Thanks, I remembered to have seen that option and couldnt find it.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!