Delete orphaned backups

janvv

Active Member
Jun 21, 2020
63
10
28
66
52.24154182722349, 5.117853866801705
When I delete a VM or LXC, then the backup is not deleted along with it.
My backup disk is having a lot of backups that do no longer belong to an existing machine.
The pruning system doesn't take care of that either.

What is the best way of cleaning those old backup files?
 
  • Like
Reactions: SilicaStorm
For Vzdump backups just open the folder that you use as your Vzdump backup storage and delete the files you don't want anymore. With PBS backups they are still listed in the PBS webUI and you can use it to delete them.
 
Last edited:
  • Like
Reactions: SilicaStorm
hmm... I was hoping to find a way (or a shell script) to select backup files that do not belong to an existing machine.
In my retention scheme, backups will be removed when they are older than 1 week. So I will add a cron job to clean up files having -mtime +7. Then I do not need to do anything manually.
 

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!