Backups, checkpoints, and snapshots
Three tools capture machine state, and each answers a different question:Back up now
boxd machine backup now <machine> captures the disk right away, independent of any schedule and without disturbing one. Reach for it before a migration or deploy you’re not sure about, or any time you want a fresh restore point.
Turn it on
A schedule hangs offmachine config, next to the idle timers:
backups.periodtakes a duration (24h,7d, …). Setting it enables backups.offor0disables them.backups.retentionalso takes a duration and defaults to 7 days. It requires a period to be set first.- The interval counts from the last backup. The SDKs can set a wall-clock cron schedule instead, down to one backup every 15 minutes. That floor is enforced server-side for both kinds: a tighter interval or a cron expression whose occurrences fire closer together is rejected.
- Forks inherit the source machine’s backup schedule, so a fleet forked from a golden keeps the golden’s protection.
What a capture does
Every backup, on demand or on a schedule, works the same way. The machine’s vCPUs pause for an instant (state only, without a memory dump), the disk is cloned with a reflink, and the machine resumes. The upload to object storage happens in the background from the clone, so your app sees a sub-second pause and nothing else. A failed capture never leaves the machine paused. Two things keep the storage bill honest:- An unchanged disk uploads nothing. A backup that finds the disk untouched since the last one records a pointer to it instead of re-uploading.
- Uploads are sparse-aware. Only bytes actually written to the disk are uploaded and stored, so a mostly-empty 100 GB disk backs up small.
List, restore, and delete
backup remove (or the Delete button on the console’s Backups tab) reclaims a backup the same way an expiry does: the object goes from storage first, then the record. Two backups are refused: one that’s still being captured, and one that a newer unchanged-since backup still points at, where you delete the newer one first or let it expire.
Restore is a full, in-place disk rewrite. The machine cold-boots into the backup’s disk and keeps its name, URL, SSH port, and settings. Memory and running state are not part of a backup, and everything written to the disk after that backup is gone. For a rewind that brings back memory and running processes, use a checkpoint.
The same commands work from the in-VM CLI inside a machine, and backups can also be managed from the console.
From the SDKs
Both SDKs expose on-demand capture, the schedule, the backup list, restore, and delete undermachines.backups. intervalSecs counts from the last backup; pass cron (standard 5-field syntax) instead for wall-clock schedules like “03:00 every night”.