Exclude all drives from specific storage by default

phsr

Active Member
Jan 4, 2018
3
1
43
Greetings. I have a PVE server with several ZFS-type storage pools, one of which (scratch) is used exclusively for throwaway virtual drives that do not need to be backed up. Users can create VMs with virtual drives residing on both main pool and scratch pool (for example the same VM will have root f/s on main, and some bulk data drive on scratch). As a global server admin, I cannot rely on each user correctly setting the backup=0 flag to each drive residing on scratch pool.

How can I set up all existing and future drives created on this pool to be excluded from PBS backup jobs? I tried messing with exclude-path in /etc/vzdump.conf, but either it is not possible to exclude this way, or I could not figure out the proper syntax.

Bash:
~# zfs list -r scratch
NAME                         USED  AVAIL     REFER  MOUNTPOINT
scratch                     13.7T  20.9T      153K  /scratch
scratch/vm-100-disk-0       33.0G  21.0T     89.5K  -
scratch/vm-102-disk-6       2.48T  20.9T     2.48T  -
scratch/vm-188-disk-0       2.06T  22.0T     1.03T  -
scratch/vm-188-disk-1        722G  21.1T      562G  -
scratch/vm-215-disk-1        309G  21.2T     1.73G  -

PVE 6.4-13; PBS 2.1-4
 
Last edited:
There's no option for that yet.
You could open an enhancement in our bugtracker detailing the reasons for this option: https://bugzilla.proxmox.com/
 
There's no option for that yet.
You could open an enhancement in our bugtracker detailing the reasons for this option: https://bugzilla.proxmox.com/
Thanks. I found 2152 that has several closed duplicates, and left a comment there.

Meanwhile I can think of a hacky workaround in a form of a periodic shell script that would search PVE guest config files, and append backup=0 to each relevant string.
 
  • Like
Reactions: mira
a vzdump hook-script could be used to ensure the guest config has those disks excluded (and either abort the backup with an error, or set those disks to be excluded).
 

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!