* [PVE-User] pbs prune from commandline ? @ 2021-04-30 10:42 Roland 2021-05-03 14:33 ` Thomas Lamprecht 0 siblings, 1 reply; 3+ messages in thread From: Roland @ 2021-04-30 10:42 UTC (permalink / raw) To: Proxmox VE user list hello, isn't there a commandline equivalent of proxmox backup server side prune ? (i.e. pbs -> Datastore -> Prune & GC -> 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. 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 !? regards roland ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PVE-User] pbs prune from commandline ? 2021-04-30 10:42 [PVE-User] pbs prune from commandline ? Roland @ 2021-05-03 14:33 ` Thomas Lamprecht 2021-05-03 16:53 ` Roland 0 siblings, 1 reply; 3+ messages in thread From: Thomas Lamprecht @ 2021-05-03 14:33 UTC (permalink / raw) To: Proxmox VE user list, Roland Hi, 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. https://pbs.proxmox.com/docs/backup-client.html#environment-variables cheers, Thomas ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PVE-User] pbs prune from commandline ? 2021-05-03 14:33 ` Thomas Lamprecht @ 2021-05-03 16:53 ` Roland 0 siblings, 0 replies; 3+ messages in thread From: Roland @ 2021-05-03 16:53 UTC (permalink / raw) To: Thomas Lamprecht, Proxmox VE user list Hi, > You can change the prune-schedule via CLI with the manager > > # proxmox-backup-manager datastore update DATASTORE --prune-schedule '...' > yes, thanks >> i only find prune option with proxmox-backup-client. > > And why exactly doesn't `proxmox-backup-client` counts as CLI? > yes, it counts. but isn't that somewhat pruning "at the remote" level, where you need a privileged (...@pbs) user for? i find using it complicated, too. >> 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. > > https://pbs.proxmox.com/docs/backup-client.html#environment-variables yes, but i'm just asking because i'd wonder if this is a "consistent" interface - i don't use prune on the client side and don't think it's easy to handle to iterate trough every single VM for pruning, as number of VMs may change and you need to adjust a commandline prune/script. i simply wonder if there isn't a commandline prune for pruning at datastore level (like you can do gc or verify via commandline at datastore level) roland ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-03 16:53 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-04-30 10:42 [PVE-User] pbs prune from commandline ? Roland 2021-05-03 14:33 ` Thomas Lamprecht 2021-05-03 16:53 ` Roland
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox