Snapsched β scheduled VM snapshots
corral snapsched runs a Kubernetes CronJob that snapshots a VM on a
schedule and prunes older auto-snapshots beyond a retention count β entirely
in-cluster, no workstation required.
corral plugin install snapsched
corral snapsched add web --every 6h --keep 12
corral snapsched ls
corral snapsched rm web
--every accepts 30m / 1h / 6h / 12h / 24h, or a raw 5-field cron
expression.
Requirementsβ
- A
VolumeSnapshotClassfor the VM's StorageClass βcorral doctorchecks for this.
How it worksβ
Shares its CronJob/RBAC plumbing (pkg/cronops) with the backup
and schedule plugins β one corral-sched ServiceAccount/Role
per namespace, additive across all three. Each snapshot run creates a
VirtualMachineSnapshot labeled corral.dev/auto-snap=<vm>, then deletes
the oldest ones beyond --keep.