Delete/Prune All Backups

proxy

Renowned Member
May 5, 2017
21
1
68
Hi all,

I have two PBS servers, one was syncing to the other and has 4 different namespaces.

I'm looking for the simplest way to delete all backups without removing the namespaces. The reason for not wanting to remove the namespaces is that they are still 'mounted' on other clusters and I'm not sure what impact it would have if the PBS storage on a cluster suddenly looses it's namespace.

I've already tried 'Prune All', but it doesn't allow blank fields (to imply everything) or even 0. Ironically a dry-run on leaving all "Keep Last" blank does actually show all the backups it would remove but specifically says "No prune selection - keeping all files." which is a pity as this would solve the issue.

Any advice please?
 
I'm not sure if I correctly understand in what place in the GUI you're trying to do that...

In the PBS GUI I would go to "Datastore" -> "yourdatastorename"
then "Prune & GC Jobs",
go to "Prune Jobs", select the job, click Edit, empty (or type "0" in all period fields (Keep Last, Keep Daily, Keep Monthly etc.), click OK.

Back to "Prune Jobs", select the job, click "Run now".

I imagine that should prune all backups.

Then go to "Garbage Collect Jobs", select a job, click "Run now".

Does it help?
 
I'm not sure if I correctly understand in what place in the GUI you're trying to do that...

In the PBS GUI I would go to "Datastore" -> "yourdatastorename"
then "Prune & GC Jobs",
go to "Prune Jobs", select the job, click Edit, empty (or type "0" in all period fields (Keep Last, Keep Daily, Keep Monthly etc.), click OK.

Back to "Prune Jobs", select the job, click "Run now".

I imagine that should prune all backups.

Then go to "Garbage Collect Jobs", select a job, click "Run now".

Does it help?

Thanks for your response. Zero cannot be used,

1758279532853.png

and leaving them empty results in:

2025-09-19T12:56:57+02:00: prune job 'default-backup'
2025-09-19T12:56:57+02:00: Starting datastore prune on datastore 'pool', root namespace, down to full depth
2025-09-19T12:56:57+02:00: No prune selection - keeping all files.
 
Thanks for your response. Zero cannot be used,

You're right. Sorry for the wrong advice.

My other idea (maybe wrong as well) is:
under "Prune Jobs" click "Add" and create a new job (so that you have a fresh situation and to not mess your previous job).
In this new job you can try various settings.
E.g. in the Namespace field: if you click the drop-down menu and instead of "Root" you select a particular namespace... will it give any progress?...

Another idea: put "1" (one) in the "Keep Last" field. Maybe this will delete all snapshots but one. This would improve the situation at least partially :)
 
Last edited:
I guess it's not a full solution (if any), but: does manual deleting some snapshots (backups) work?

Datastore --> yourdatastorename --> Content --> Root Namespace --> someNamespaceName --> vm/number --> right-click --> Remove

If not removing the full vm/number, then expand this, select some snapshot (backup), e.g.
"vm/number/2025-09-xx-T...", right-click --> Remove

Does it work?
 
Hi all,

I have two PBS servers, one was syncing to the other and has 4 different namespaces.

I'm looking for the simplest way to delete all backups without removing the namespaces. The reason for not wanting to remove the namespaces is that they are still 'mounted' on other clusters and I'm not sure what impact it would have if the PBS storage on a cluster suddenly looses it's namespace.

I've already tried 'Prune All', but it doesn't allow blank fields (to imply everything) or even 0. Ironically a dry-run on leaving all "Keep Last" blank does actually show all the backups it would remove but specifically says "No prune selection - keeping all files." which is a pity as this would solve the issue.

Any advice please?
Have you tried using the command line ?

Code:
proxmox-backup-manager prune <datastore> --namespace <namespace_name> --keep-all 0 --keep-daily 0 --keep-weekly 0 --keep-monthly 0 --keep-yearly 0

Phil
 
Have you tried using the command line ?

Code:
proxmox-backup-manager prune <datastore> --namespace <namespace_name> --keep-all 0 --keep-daily 0 --keep-weekly 0 --keep-monthly 0 --keep-yearly 0

Phil

I have tried. The above won't work exactly,

# proxmox-backup-manager prune
Error: no command specified.
Possible commands: create, list, remove, run, show, update

But the below gives the following error:

# proxmox-backup-manager prune create ID --store ID --ns namespace --keep-last 0 --keep-hourly 0 --keep-daily 0 --keep-weekly 0 --keep-monthly 0 --keep-yearly 0
Error: parameter verification failed:
- 'keep-last': value must have a minimum value of 1 (got 0)
- 'keep-hourly': value must have a minimum value of 1 (got 0)
- 'keep-daily': value must have a minimum value of 1 (got 0)
- 'keep-weekly': value must have a minimum value of 1 (got 0)
- 'keep-monthly': value must have a minimum value of 1 (got 0)
- 'keep-yearly': value must have a minimum value of 1 (got 0)
Usage: proxmox-backup-manager prune create <id> --schedule <calendar-event> --store <string> [OPTIONS]
 
At my server I can see slightly different options - maybe other version or options have aliases... Anyway.

What if you execute this command:

proxmox-backup-manager prune create SOMEid --store YOURDATASTORENAME --ns YOURNAMESPACE --schedule daily --keep-last 1
 
At my server I can see slightly different options - maybe other version or options have aliases... Anyway.

What if you execute this command:

proxmox-backup-manager prune create SOMEid --store YOURDATASTORENAME --ns YOURNAMESPACE --schedule daily --keep-last 1

Thank you for this but I do not want to keep any. 1 would work but that leaves 1 behind.. I want to basically "delete all".
 
I know. But if only one is kept, you will have much less manual work with deleting it, instead of manually deleting many.

In my post on Saturday at 13:09 I showed you a method of manual deleting and I asked whether it worked, but I can't see your reply...
 
I guess it's not a full solution (if any), but: does manual deleting some snapshots (backups) work?

Datastore --> yourdatastorename --> Content --> Root Namespace --> someNamespaceName --> vm/number --> right-click --> Remove

If not removing the full vm/number, then expand this, select some snapshot (backup), e.g.
"vm/number/2025-09-xx-T...", right-click --> Remove

Does it work?

Yes, this does work when doing one-by-one via the GUI.. but it would take me a very long time..