pbs_prune
Prune Proxmox Backup Server snapshots based on retention policies (keep-last, daily, weekly, monthly, yearly). Dry-run previews deletions; confirm executes with safety gates.
Instructions
MUTATION: prune backup snapshots per a retention policy. TWO safety gates: confirm (Proximo dry-run vs execute) AND dry_run (PBS-side preview). dry_run=True (default) only previews; dry_run=False DELETES recovery points (PLAN is HIGH, no undo). confirm=True to execute. Synchronous — returns prune decisions. For one specific snapshot use pbs_snapshot_delete instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ns | No | Namespace path to scope pruning to; omit for the root namespace. | |
| store | Yes | PBS datastore name to prune. | |
| confirm | No | Proximo dry-run gate: True executes (subject to dry_run); default only plans. | |
| dry_run | No | PBS-side preview: True (default) previews only; False actually deletes snapshots. | |
| backup_id | No | Backup group ID (e.g. VMID/CTID or host name) to scope pruning to. | |
| keep_last | No | Number of most-recent backups to always keep. | |
| keep_daily | No | Number of daily backups to keep. | |
| backup_type | No | Backup type filter: 'vm', 'ct', or 'host'. | |
| keep_weekly | No | Number of weekly backups to keep. | |
| keep_yearly | No | Number of yearly backups to keep. | |
| keep_monthly | No | Number of monthly backups to keep. | |
| proximo_target | No | Which configured Proxmox target to run this call against — a target name from your multi-target config (a specific PVE/PBS/PMG/PDM box). Omit to use the single/default target from the environment; the selection applies only to this call. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |