Deleting Failed Backups via CLI

sergioposadam

New Member
Feb 3, 2025
9
2
3
Hey everyone,

I'm managing backups on my PBS and I've run into a bunch of failed backups that I need to delete. I've attached an image showing the list of backups with their statuses – you can see the failed ones marked in red.

Can anyone guide me on the specific commands I should use to delete these failed backups?

Thanks a lot for your help!
 

Attachments

  • Failed backups.JPG
    Failed backups.JPG
    76.6 KB · Views: 13
proxmox-backup-client snapshot forget ...
 
Thank you for responding.

That command will help me delete specific snapshots, but if I have 50 VMs, I don't want to see the GUI for failed backups and run the command one by one. How can I identify which ones have failed from the CLI?

Code:
root@pbs001:~# proxmox-backup-client snapshot list vm/100 --repository REPO
│ snapshot                    │    size │ files                                                                │
│ vm/100/2025-03-15T01:00:08Z │ 200 GiB │ client.log drive-ide0.img drive-ide1.img index.json qemu-server.conf │
│ vm/100/2025-03-16T01:00:01Z │ 200 GiB │ client.log drive-ide0.img drive-ide1.img index.json qemu-server.conf │
│ vm/100/2025-03-22T01:00:05Z │ 200 GiB │ client.log drive-ide0.img drive-ide1.img index.json qemu-server.conf │
│ vm/100/2025-03-23T01:00:01Z │ 200 GiB │ client.log drive-ide0.img drive-ide1.img index.json qemu-server.conf │
│ vm/100/2025-03-24T01:00:02Z │ 200 GiB │ client.log drive-ide0.img drive-ide1.img index.json qemu-server.conf │
│ vm/100/2025-03-29T02:00:02Z │ 200 GiB │ client.log drive-ide0.img drive-ide1.img index.json qemu-server.conf │
│ vm/100/2025-03-31T01:00:07Z │ 200 GiB │ client.log drive-ide0.img drive-ide1.img index.json qemu-server.conf │
│ vm/100/2025-04-01T01:00:01Z │ 200 GiB │ client.log drive-ide0.img drive-ide1.img index.json qemu-server.conf │
│ vm/100/2025-04-08T01:00:01Z │ 200 GiB │ client.log drive-ide0.img drive-ide1.img index.json qemu-server.conf │
 
Last edited:
if you add --output-format json-pretty, you get a list of json objects representing the snapshots, one of the fields in such an object is the last verification state. you can use "jq" or some other tool for parsing json to script the rest.

note that failing verifications shouldn't happen, if this is a regular occurrence for you please find out the reason and fix it!