How can I prune backups from the CLI without backuping ?

Marc Ballat

Well-Known Member
Dec 28, 2015
33
3
48
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

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!