Backup schedule question

tsumaru720

Renowned Member
May 1, 2016
66
2
73
45
Hello,

I have a backup schedule to take a backup every day at a certain time of all my VMs/CTs.

I am looking to have my backups keep the last two weeks of daily backups, but when I delete a VM/CT no new ones will be created - so in that instance I'd like for it to eventually cycle out and drop to the last backup available (so i guess 1 month?)

Is this kind of schedule possible with PBS? I dont want to keep all backups of a deleted CT/VM but I'd like to keep at least one long term just in case, without having to manually delete the old snapshots
 
You could code yourself a hook script that will make use of the proxmox-backup-client to prune all backup snapshots of a guests if that guest doesn't exist anymore on the PVE, each time a backup job is finishing.

But a bit too dangerous in my opinion...maybe you delete a VM because you want to restore old version from backup but then those backups will be wiped from PBS before you actually got the chance to restore it. Or something similar. I would always want to delete those backups manually.
 
Last edited: