Overlapping PVE Backup Jobs w/ Conflicting Retention

vbreyter

New Member
Jan 21, 2024
1
0
1
I have set up two backup jobs in PVE backing up to a PBS. Job A backs up critical VMs every 30 mins, with keep-hourly=24, and Job B that backs up ALL VMs nightly with keep-daily=7, keep-weekly=10, keep-monthly=12, keep-yearly=99. What I have found is that when Job B runs, its retention settings cause the backups created by Job A to be pruned.

Is this the intended behavior -- that backup jobs will prune backups created by other backup jobs?

If so, is there a recommended best practice to workaround this issue? I know I can exclude the Job A VMs from Job B, but Job B is meant to be a catch-all so that if a VM somehow fell through the cracks on the config for the other jobs, it will at least be backed up nightly. I am thinking I can setup different namespaces for the different backups jobs?
 
I have set up two backup jobs in PVE backing up to a PBS. Job A backs up critical VMs every 30 mins, with keep-hourly=24, and Job B that backs up ALL VMs nightly with keep-daily=7, keep-weekly=10, keep-monthly=12, keep-yearly=99. What I have found is that when Job B runs, its retention settings cause the backups created by Job A to be pruned.

Is this the intended behavior -- that backup jobs will prune backups created by other backup jobs?

If so, is there a recommended best practice to workaround this issue? I know I can exclude the Job A VMs from Job B, but Job B is meant to be a catch-all so that if a VM somehow fell through the cracks on the config for the other jobs, it will at least be backed up nightly. I am thinking I can setup different namespaces for the different backups jobs?
Hi,
yes this is expected, the retention is not limited to the backups created by that job, but rather the whole datastore/namespace/group your snapshots are located in.

You could of course use different namespaces, another option would be to setup a prune job on the PBS side rather to have this done by the PVE client, for this see [0]. Also, please have a look at the prune simulator [1], I have the feeling the retention settings you are using are not what you expect them to be.

[0] https://pbs.proxmox.com/docs/maintenance.html#pruning
[1] https://pbs.proxmox.com/docs/prune-simulator/index.html
 
Another option perhaps would be to create a new PBS datastore, that way each backup job will backup to each datastore with own pruning and schedule. If you are using ZFS storage, its just a matter of creating a new dataset and use that for the new datastore.
 
  • Like
Reactions: Chris

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!