Snapshot Schedules
Per-VM (or per-tag) snapshot schedules. Cron-style cadence, retention by count or age, optional include-RAM, optional disk filter. Sits next to PBS backups but is much cheaper for "I just want to roll back the last hour" use cases.
Schedule fields
| Field | Description |
|---|---|
name |
Policy name |
target_type |
vm (comma-separated VMIDs in target_value) or tag (exact tag match, PVE ;-delimited) |
target_value |
VMID list or tag string |
schedule |
hourly / daily / weekly (Sunday) / monthly / once / cron |
schedule_at |
HH:MM (server timezone) for daily/weekly/monthly |
schedule_cron |
5-field cron for schedule=cron (hand-rolled matcher, no croniter) |
schedule_day |
Day-of-month 1–31 for schedule=monthly (clamped to month length) |
run_once_at |
ISO datetime for schedule=once |
prune_only |
Skip creating snapshots, only run retention |
retention_count |
Keep the last N snapshots created by this policy |
retention_days |
Also drop policy-owned snapshots older than N days |
include_ram |
Live snapshot (vmstate) |
Snapshots are auto-named pegaprox-<policy-id>-<timestamp>; retention only ever touches names with that prefix, so manual snapshots are never pruned.
Scheduler
- 60-second tick, idempotent - server restarts mid-tick won't double-fire.
- Snapshot creation respects the existing PVE per-storage limits and Ceph rate-limits.
- Retention prunes only snapshots created by this schedule (
name_prefixmatch) - manual snapshots are never touched. - Failures are logged to the audit log and surfaced as alerts (severity: warning).
Client Portal
The Client Portal plugin gets a Snapshots tab that lists snapshots created by user-visible schedules and exposes a one-click "Snapshot now" button (with the schedule's retention applied). Tenants can roll back without an admin in the loop.
API
All require the vm.snapshot permission and are scoped per cluster.
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/clusters/{cluster_id}/snapshot-policies |
List policies for a cluster |
POST |
/api/clusters/{cluster_id}/snapshot-policies |
Create a policy |
PUT |
/api/clusters/{cluster_id}/snapshot-policies/{id} |
Update |
DELETE |
/api/clusters/{cluster_id}/snapshot-policies/{id} |
Delete (leaves existing snapshots) |
POST |
/api/clusters/{cluster_id}/snapshot-policies/{id}/run |
Run now (works on a disabled policy) |
GET |
/api/clusters/{cluster_id}/snapshot-policies/{id}/runs |
Last 50 run records |