Proxmox VE has a very useful backup feature. We recently showed how to Back up Proxmox VE VMs Quickly and Easily. For those who may have created backup jobs before they understood the retention feature, or if new retention requirements come about, then there is an easy way to prune backups and get more space.
How to Prune Proxmox VE Backups
Of course, we should mention that if you just want to delete a single backup, you can just click on the VM’s backup tab and pick the backup to delete.
That works for one or two, but it is not great for removing tens or hundreds of backups.
An alternative way to do this is to go to the backup storage on the left panel and then go to the backups which will list the backups that are being retained on the storage. Here, pick the VM or container and just select one of the backups. You do not need to pick a particular one so long as the backup is for the correct VM. For example, here is 802 under vzdump-qemu-802
The trick here is to click “Prune group qemu/802”
Here you can pick different options and if a backup does not match the criteria, it is deleted. For example, you could want to keep just the last 3 backups. Or perhaps you want to keep one daily backup for a week, then a weekly backup for 4 weeks, then 12 monthly backups for a year’s worth. On the right side, it shows the backup time, and then the matched criteria to keep that backup copy. It then shows “false” for the ones that do not match a rule and, therefore, will be pruned. This is very similar to what it looks like when you set backup schedules, so hopefully, the concepts are familiar.
Final Words
Overall, this is really easy to do. The first time I set up Proxmox VE backups, I was backing up big VMs and saving all of them. It took a few months, but then I realized that I was filling up storage needlessly. Of course, it is better to set the proper retention settings in when you start your backup jobs. The Proxmox VE backup pruning tool is a simple way to free up space. Call it a bit of spring cleaning for your backups. Hopefully, this helps you get started with Proxmox VE backups, or at least getting another tool to help manage them.
I hope these articles are a prelude to utilizing Proxmox Backup Server which is a great addition even to a single Proxmox VE instance. It can be installed alongside PVE.
Just to clarify.
1. You can manually prune backups.
2. You can prune backups as part of the backup process. Data Center -> Job -> Retention. This works with/without Proxmox Backup server.
3. If you are running Proxmox Backup server, pruning can be done as a schedule task.
If you are using Proxmox Backup server, you can also Verifying your backups.
In my case, I prefer to prune (Retention) the backups as part of the backup process and do the verification as a scheduled job
My 2 cents.