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
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | 1 to 100 characters; unique per host |
path | string | Yes | Directory on the host to back up, up to 1024 characters |
schedule_cron | string | No | Cron expression, parsed and validated when the configuration is saved |
timezone | string | No | Timezone the schedule is read in; default UTC |
retention_count | integer | No | How many snapshots to keep, 1 to 365 |
retention_days | integer | No | How many days to keep snapshots, 1 to 3650 |
exclude_patterns | string[] | No | Globs to exclude |
compression_level | integer | No | 1 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 | Action | REST |
|---|---|
| Trigger now | POST .../backup-configs/{config_id}/trigger |
| Pause | POST .../backup-configs/{config_id}/pause |
| Resume | POST .../backup-configs/{config_id}/resume |
| Update | PATCH .../backup-configs/{config_id} |
| Delete | DELETE .../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 field | Meaning |
|---|---|
id | Snapshot ID, used by every snapshot route |
config_id | The configuration that produced it |
host_id | The host it was taken from |
state | uploading, complete, failed, or expired |
total_bytes | Uncompressed size |
compressed_bytes | Stored size |
chunk_count | Number of stored chunks |
started_at, completed_at | Timing |
error | Failure 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
| Field | Type | Required | Description |
|---|---|---|---|
target_host_id | string | Yes | Host to write onto |
target_path | string | No | Directory to write into |
overwrite | boolean | No | Replace 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.