Custom prune setting for specific VM

yurtesen

Member
Nov 14, 2020
38
5
13
Hello,

I have a VM which need drastically different backup retention. Is there currently a good way to setup retention per VM?

I found some old threads (~2 year old) regarding this but it looked like this feature was not implemented. I guess one can leverage namespaces feature to workaround this but it seems cumbersome. My understanding was to make namespace for that VM only and add it as another storage to the datacenter and use that VM with that namespace only. I guess this could be a solution for 1-2 VMs but it seems quite unflexible when many different retention settings for different VMs are involved.

Thanks!
 
You can set a retention in the backup job settings. Definitely not ideal, but if you have a backup job that's regularly run, it should work fine.
 
  • Like
Reactions: yurtesen
Does the retention in the backup job always override the retention in PBS? or if both have retention settings, the one which retains less wins?
 
Neither overrides the other. The retention in the backup job is used whenever the backup job runs, the retention in the prune job is used when the prune job is executed.

That means you should be careful not to accidentally prune backups you need.
 
  • Like
Reactions: yurtesen
Does the retention in the backup job always override the retention in PBS? or if both have retention settings, the one which retains less wins?
There is also a third retention. The retention you can set in PVE for the PBS storage. That one is overwritten by the retention of the PVEs backup job.
And there are also namespaces in case you need to do some more complex pruning. I for example use namespaces because I want different retentions for stop mode and snapshot mode backups of the same guests.
 

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!