Backup schedule question

tsumaru720

Well-Known Member
May 1, 2016
66
2
48
44
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:

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!