Tape backup: exclude VMs from different namespaces

Jul 24, 2025
3
0
1
Hello,

we operate two independent PVEs that write their backups to a shared PBS in two namespaces:

pve1/ct/103
pve1/vm/101
pve1/vm/102
...
pve2/ct/101
pve2/vm/102
pve2/vm/103...

As you can see, there are overlaps in the IDs of the two PVEs, but thanks to namespaces, this is not a problem.

We now have a tape backup job that is supposed to back up all VMs and containers for offsite backup. However, we do not want backup non productive test VMs, whose backups are also available in the PBS but are not needed in the offsite backup.

For example, on pve2, VM 102 is a test VM with 5 TB of data volume. We would now like to exclude the path pve2/vm/102 from the backup job without simultaneously filtering out VM 102 from pve1.

Unfortunately, there are no examples for our scenario in the documentation, and attempts with regex entries such as “.*pve2/vm/102.*” were unsuccessful.

Can our use case be implemented with the regex filters?
 
Hi,

looking at the code, the group filters are really only effective on group names, not including the namespace so no, regex filtering will not work here

what you can do however is to add a tape backup job for each namespace with it's own group filter, and schedule them close one after another

they will wait until the drive is free when the earlier backup is still running, and if the allocation/retention setups allows for them to continue the media-set, the data will still be deduplicated
 
Hi Dominik, thank you for your suggestion. Have I understood correctly that by “group filter” you do not mean the filter of type ‘group’ but filters in general, i.e. in this case I will also have to filter out the mentioned “VM 102” using regex?
 
yes, these are call 'group filters' in the code and have 3 types, 'type' (so either host/ct/vm), 'group' (e.g. vm/100) and 'regex'