[PVE-User] pbs prune from commandline ?

Thomas Lamprecht t.lamprecht at proxmox.com
Mon May 3 16:33:41 CEST 2021


On 30.04.21 12:42, Roland wrote:
> isn't there a commandline equivalent of  proxmox backup server side prune ?
> (i.e. pbs -> Datastore -> Prune & GC -> Prune Schedule )

You can change the prune-schedule via CLI with the manager

# proxmox-backup-manager datastore update DATASTORE --prune-schedule '...'

> how can i trigger a prune from commandline on the pbs side , like i can
> do gc and verify  with proxmox-backup-manager  ?
> i only find prune option with proxmox-backup-client.

And why exactly doesn't `proxmox-backup-client` counts as CLI?

> this should be be equivalent to:  pve -> storage -> pbs-ds -> Backup
> Retention  tab, i.e. it's the prune definition on the client side.
> shouldn't there exist prune option in proxmox-backup-manager, too !?

The manager is more for server-admin commands, GC is always a datastore wide operation
not affecting any backups, so no client notices it.

Pruning, on the other hand, should be done by the client making the backups itself,
as it has a big impact on the actual backup availability.

But the client is available in all our repositories (PBS, PVE, PMG) so you can just
install it, if not already done, and use that:

# proxmox-backup-client prune vm/100/2021-03-23T12:32:02Z --keep-last 100 
--keep-daily 42 ...

If you do not want to always login you can just edit your .bashrc (or whatever your shell uses)
and setup the environment variables for your local server there.



More information about the pve-user mailing list