[SOLVED] Backups: trigger pruning manually

Jul 7, 2021
49
8
13
46
I have mounted a SMB share for backups which proved very unreliable during the backup process. I switched to a hook script now, copying the backup file via scp to the remote destination. However, I would still like to trigger the pruning of backups as setup for this storage location. Can I do this via script?
 
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.

see "man pvesm"
 
If no keep options are specified, those from the storage configuration are used.