How can I prune backups from the CLI without backuping ?

Marc Ballat

Renowned Member
Dec 28, 2015
38
7
73
56
Hi,

is there a way to prune backups for a given container without creating a new back-up ? I can of course do it from the GUI but would like to do it from the CLI.

Thanks.

Marc
 
from the PVE side:
Code:
pvesm prune-backups <storage> [OPTIONS]

Prune backups. Only those using the standard naming scheme are considered. If no keep options are specified, those from the storage configuration are used.

<storage>: <string>
The storage identifier.
--dry-run <boolean>
Only show what would be pruned, don’t delete anything.
--keep-all <boolean>
Keep all backups. Conflicts with the other options when true.
--keep-daily <N>
Keep backups for the last <N> different days. If there is morethan one backup for a single day, only the latest one is kept.
--keep-hourly <N>
Keep backups for the last <N> different hours. If there is morethan one backup for a single hour, only the latest one is kept.
--keep-last <N>
Keep the last <N> backups.
--keep-monthly <N>
Keep backups for the last <N> different months. If there is morethan one backup for a single month, only the latest one is kept.
--keep-weekly <N>
Keep backups for the last <N> different weeks. If there is morethan one backup for a single week, only the latest one is kept.
--keep-yearly <N>
Keep backups for the last <N> different years. If there is morethan one backup for a single year, only the latest one is kept.
--type <lxc | qemu>
Either qemu or lxc. Only consider backups for guests of this type.
--vmid <integer> (1 - N)
Only consider backups for this guest.

https://pve.proxmox.com/pve-docs/pvesm.1.html
 
  • Like
Reactions: Tmanok