pbs_snapshot_protected_set
Set or clear the protected flag on a PBS snapshot to shield it from pruning and garbage collection (low risk) or to allow auto-deletion (high risk). Dry-run by default; confirm to execute.
Instructions
MUTATION: set or clear the protected flag on a PBS snapshot. RISK IS CONDITIONAL:
protected=True → LOW: shields the snapshot from pruning and GC (protective). protected=False → HIGH: SILENTLY re-enables pruning/GC — this recovery point can now be auto-deleted by the next prune job or GC run. No undo once auto-deleted.
No PBS snapshot primitive for rollback. Dry-run by default. confirm=True to execute. To annotate rather than protect a snapshot use pbs_snapshot_notes_set; to delete it outright use pbs_snapshot_delete.
PUT /admin/datastore/{store}/protected Smoke-confirm: exact path + param names (backup-type, backup-id, backup-time, protected).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ns | No | Namespace path the snapshot lives in; omit for the root namespace. | |
| store | Yes | PBS datastore name. | |
| confirm | No | Set True to execute; False (default) only returns the dry-run plan. | |
| backup_id | Yes | Backup group ID (e.g. VMID/CTID or host name). | |
| protected | Yes | True shields the snapshot from pruning/GC (LOW); False allows auto-deletion (HIGH). | |
| backup_time | Yes | Snapshot timestamp as a Unix epoch integer, identifying the exact backup run. | |
| backup_type | Yes | Backup type of the snapshot: 'vm', 'ct', or 'host'. | |
| 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 |