Custom prune setting for specific VM

yurtesen

Active Member
Nov 14, 2020
38
5
28
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.
 
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.
Sorry Dunuin, I know it's a very old post, may I ask you why you do stop and snapshot backup for the same guest?
I use to stop the domain controllers because a very bad experience about the sync between them but are there other best practices about that?