Delete/remove backups based on specific datetime

TwiX

Renowned Member
Feb 3, 2015
320
23
83
Hi,

Instead of manually deleting old backups 1 by 1 (because for example vm/ ct doesn't exist anymore), is there a way to remove all backups that had been created before specific datetime ?

Thanks !

Antoine
 
Yes I already have configured pruning and garbage collection...It works as expected.

But in case where vm/ct id doesn't exist (because the vm is removed for example), snapshots are kept forever ....
 
pvesm prune-backups STORAGE --keep-daily 1 --vmid VMID --type <lxc|qemu>

if you want to do it on the PVE side (obviously, other keep settings are possible as well ;)).
 
Ok maybe because of the 'last ' field in prune section ?
This must be the reason why it keeps all datas ?
 
please explain more clearly what you want and what you have configured
- pruning can be configured on the PBS side (independent of backups being made by clients)
- pruning can be configured on the PVE side (run *after* a backup task if *remove* is set on the vzdump invocation)

the latter won't ever be triggered for VMIDs which don't exist - there is no backup running, so also no post-backup pruning obviously. the former doesn't know whether a VMID exists, it will just work on whatever is there on the PBS side.

note that you can remove *all* backups when removing a guest by ticking the respective box..