pbs_datastore_prune
Prunes every backup group in a datastore or namespace tree based on a retention policy. Run with default dry-run mode to preview deletions, or set confirm to true to permanently remove snapshots.
Instructions
MUTATION: prune EVERY backup group in a datastore/namespace tree per a retention policy — the WHOLE-DATASTORE prune, schema-distinct from the single-group pbs_prune (which scopes to one backup-type+backup-id and cannot recurse namespaces).
dry_run=True (this tool's default — a deliberate flip of the schema's own false default, same as pbs_prune's) → RISK_LOW preview; dry_run=False → RISK_HIGH: PERMANENTLY DELETES snapshots across every group in scope; with NO keep_* set, ALL prunable snapshots are candidates. Dry-run-PLAN by default; confirm=True executes (POST /admin/datastore/{store}/prune-datastore, async — UPID; a null return records "ok"); the prune decisions land in the task log (pbs_tasks_list). GC afterward reclaims the space. Needs PROXIMO_PBS_* config.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ns | No | Namespace to scope the prune to; omit for the root namespace. | |
| store | Yes | PBS datastore name. | |
| confirm | No | False (default) returns a dry-run PLAN only; True executes (which, with dry_run=True, still deletes nothing). | |
| dry_run | No | True (THIS TOOL'S default — the schema's own default is false): report what would be pruned without deleting. Set False to actually delete. | |
| keep_last | No | Number of backups to keep (>=1). | |
| max_depth | No | Namespace recursion depth 0-7; omit for automatic full recursion. | |
| keep_daily | No | Number of daily backups to keep (>=1). | |
| keep_hourly | No | Number of hourly backups to keep (>=1). NOT available on the single-group pbs_prune — this endpoint alone exposes it. | |
| keep_weekly | No | Number of weekly backups to keep (>=1). | |
| keep_yearly | No | Number of yearly backups to keep (>=1). | |
| keep_monthly | No | Number of monthly backups to keep (>=1). | |
| 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 |