Prune Datastore
pbs_prune_datastorePrune outdated snapshots from a Proxmox backup group using retention policies. Use dry-run mode to preview deletions before applying.
Instructions
Run a prune operation on a backup group to remove old snapshots per retention policy. Supports dry-run mode.
Args:
store (string): Datastore name
backup_type (string): Backup type — "vm", "ct", or "host"
backup_id (string): Backup ID (e.g. "100")
dry_run (boolean, optional): If true, only show what would be pruned (default false)
keep_last (number, optional): Keep the last N snapshots
keep_hourly (number, optional): Keep N hourly snapshots
keep_daily (number, optional): Keep N daily snapshots
keep_weekly (number, optional): Keep N weekly snapshots
keep_monthly (number, optional): Keep N monthly snapshots
keep_yearly (number, optional): Keep N yearly snapshots
ns (string, optional): Namespace path
Returns: Task UPID or dry-run results showing which snapshots would be removed/kept.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ns | No | Namespace path | |
| store | Yes | Datastore name | |
| dry_run | No | Only show what would be pruned | |
| backup_id | Yes | Backup ID (e.g. '100') | |
| keep_last | No | Keep last N snapshots | |
| keep_daily | No | Keep N daily | |
| backup_type | Yes | Backup type | |
| keep_hourly | No | Keep N hourly | |
| keep_weekly | No | Keep N weekly | |
| keep_yearly | No | Keep N yearly | |
| keep_monthly | No | Keep N monthly |