Skip to main content

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 VolumeSnapshotClass for the VM's StorageClass β€” corral doctor checks 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.