Priority between prune schedules

NetUser

Member
Sep 20, 2021
27
1
8
28
Hi everyone,

i'm trying to deal with a project issue, in particular, prune/GC schedule for two different groups of VM, giving you a couple of data:

Group A: 1 backup every 24h, data retention A scheduled via PBS
Group B: 1 backup every hour, data retention B scheduled via cron script (better explanation in further lines)

Only one datastore on PBS (and available on hardware) where both Group A and B backups are saved

I've managed to use the GUI (both PVE and PBS) for Group A, and all is working as intended.
For Group B (following several posts in this forum) i've put a script in /etc/pve called mybackups.cron, with a link in /etc/cron.d, and the backups are ok, but I'd like to have a different data retention than the one set up on my PBS for Group A

If I specify a different data retention in the mybackups.cron, will this override the one I've scheduled in my PBS for the datastore i put both the groups in?

example: "19 * * * * root vzdump --prune-backups keep-last=24,keep-daily=11,keep-weekly=6,keep-monthly=6,keep-yearly=1 [id1]...[idN] --mode snapshot --mailto [...]"

Many thanks in advance!
 
Hi,
if there is a prune schedule on the PBS side, it will affect all backups on the datastore. If there are custom prune options on the PVE side, those will be used as well (for each backup group individually, after each new backup is taken). So effectively, the more aggressive retention wins.

You can either use two datastores or only configure pruning on the PVE side.
 

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!