Skip to content

Backups & snapshots

Preview A snapshot is a point-in-time capture of an environment — its database and files together. You take a snapshot with a backup, restore one in place, and download the archive when you need a copy off-platform. Snapshots are how you roll back data, where a deployment rollback rolls back code.

Field Type Description
id string Stable identifier, e.g. snap_01J8....
env_id string The environment this snapshot was taken from.
kind string manual, scheduled, or pre_deploy.
size_bytes integer Size of the snapshot archive.
includes string[] What it covers — db, files.
created_at string RFC 3339 timestamp.
status string ready, creating, restoring.

GET /v1/sites/{id}/environments/{envID}/snapshots[/{snapID}]

Section titled “GET /v1/sites/{id}/environments/{envID}/snapshots[/{snapID}]”

backups:read List the snapshots for an environment (cursor-paginated) or retrieve one.

List an environment's snapshots
curl "https://api.managed.dev/v1/sites/site_01J7.../environments/env_01J8.../snapshots?limit=20" \
-H "Authorization: Bearer mfk_live_..."
Response
{
"data": [
{
"id": "snap_01J8...",
"env_id": "env_01J8...",
"kind": "scheduled",
"size_bytes": 412300544,
"includes": ["db", "files"],
"status": "ready",
"created_at": "2026-06-24T03:00:11Z"
}
],
"pagination": { "next_cursor": "eyJ0...", "has_more": true },
"request_id": "req_01J9..."
}

POST /v1/sites/{id}/environments/{envID}/backups

Section titled “POST /v1/sites/{id}/environments/{envID}/backups”

backups:write Take a snapshot now. Returns a 202 job; the resulting snapshot id is on the job’s resource.

Parameter Type Required Description
includes string[] no What to capture — db, files, or both. Both by default.
label string no A human label to find the snapshot by later.
Take a snapshot before a risky change
curl -X POST https://api.managed.dev/v1/sites/site_01J7.../environments/env_01J8.../backups \
-H "Authorization: Bearer mfk_live_..." \
-H "Idempotency-Key: 3f8c...b1" \
-H "Content-Type: application/json" \
-d '{ "includes": ["db", "files"], "label": "before-plugin-update" }'
Response (202 Accepted)
{
"data": {
"id": "job_01J9...",
"type": "snapshot.create",
"status": "running",
"progress": 60,
"created_at": "2026-06-24T14:50:33Z",
"resource": { "type": "snapshot", "id": "snap_01J8...", "env_id": "env_01J8..." },
"links": { "self": "/v1/jobs/job_01J9...", "stream": "/v1/jobs/job_01J9.../stream" }
},
"request_id": "req_01J9..."
}

POST /v1/sites/{id}/environments/{envID}/snapshots/{snapID}/restore

Section titled “POST /v1/sites/{id}/environments/{envID}/snapshots/{snapID}/restore”

backups:write Restore a snapshot in place, replacing the environment’s current database and files. Returns a 202 job.

Parameter Type Required Description
includes string[] no Restore only db or only files; both by default.
Restore a snapshot
curl -X POST https://api.managed.dev/v1/sites/site_01J7.../environments/env_01J8.../snapshots/snap_01J8.../restore \
-H "Authorization: Bearer mfk_live_..." \
-H "Idempotency-Key: a90d...5e"

GET /v1/sites/{id}/environments/{envID}/snapshots/{snapID}/download

Section titled “GET /v1/sites/{id}/environments/{envID}/snapshots/{snapID}/download”

backups:read Get a short-lived, signed URL to download the snapshot archive — for keeping a copy off-platform or restoring elsewhere.

Download a snapshot archive
curl -L "https://api.managed.dev/v1/sites/site_01J7.../environments/env_01J8.../snapshots/snap_01J8.../download" \
-H "Authorization: Bearer mfk_live_..." \
-o snapshot.tar.zst
Response (signed URL)
{
"data": {
"url": "https://dl.managed.dev/snap_01J8.../archive.tar.zst?sig=...",
"expires_at": "2026-06-24T15:10:00Z",
"size_bytes": 412300544
},
"request_id": "req_01J9..."
}