Backups and snapshots

A backup configuration names one directory on one host, a schedule, and a retention policy. Each run produces a snapshot, and a snapshot can be restored onto any host in your organization.

This is the backup path for machines you own. Managed sandboxes and computers use their own snapshots.

Create a backup configuration

FieldTypeRequiredDescription
namestringYes1 to 100 characters; unique per host
pathstringYesDirectory on the host to back up, up to 1024 characters
schedule_cronstringNoCron expression, parsed and validated when the configuration is saved
timezonestringNoTimezone the schedule is read in; default UTC
retention_countintegerNoHow many snapshots to keep, 1 to 365
retention_daysintegerNoHow many days to keep snapshots, 1 to 3650
exclude_patternsstring[]NoGlobs to exclude
compression_levelintegerNo1 to 22; default 19

A configuration is active or paused. last_snapshot_at and last_snapshot_size_bytes record the most recent run.

Run and manage schedules

miosa host backup trigger <host> nightly
miosa host backup pause <host> nightly
miosa host backup resume <host> nightly
miosa host backup update <host> nightly --schedule "0 4 * * *"
miosa host backup rm <host> nightly --yes
ActionREST
Trigger nowPOST .../backup-configs/{config_id}/trigger
PausePOST .../backup-configs/{config_id}/pause
ResumePOST .../backup-configs/{config_id}/resume
UpdatePATCH .../backup-configs/{config_id}
DeleteDELETE .../backup-configs/{config_id}

A trigger returns 202 with the new snapshot while the upload is still running. Triggering a backup on a host that is not connected returns 503.

Snapshots

Snapshot fieldMeaning
idSnapshot ID, used by every snapshot route
config_idThe configuration that produced it
host_idThe host it was taken from
stateuploading, complete, failed, or expired
total_bytesUncompressed size
compressed_bytesStored size
chunk_countNumber of stored chunks
started_at, completed_atTiming
errorFailure reason, when state is failed

Only a snapshot in state complete can be restored. Snapshot routes are tenant-scoped, so GET /api/v1/opencomputers/snapshots/{id} and DELETE /api/v1/opencomputers/snapshots/{id} take the snapshot ID alone, without a host.

Restore a snapshot

FieldTypeRequiredDescription
target_host_idstringYesHost to write onto
target_pathstringNoDirectory to write into
overwritebooleanNoReplace existing files; default false

A restore returns 202 with a restore_id. It is asynchronous: watch the target host’s filesystem or the audit log to confirm the files landed.

What a backup does and does not cover

  • It covers the files under one directory tree on one host. It does not image the operating system, and it does not capture running process state.
  • It does not back up a database consistently on its own. Quiesce or dump the database into the backed-up directory before the schedule runs, or use the database’s own backup tooling.
  • It is not a substitute for a plan that covers losing the machine itself. Keep the credentials and configuration needed to rebuild the host somewhere other than the host.
Was this page helpful?