Skip to main content
These endpoints are behind Settings → Backups (Backups and restore). They need a signed-in superadmin, except where noted: while first-run setup is pending, uploading an archive, the dry run and the restore work without signing in, since restoring a backup is the other way to set up a new server.

Endpoints

Targets

Secrets (secret_key, password, private_key, key_passphrase) come back as ••••••••. Send that, or leave the field out, to keep the stored one. Each target in GET /api/backups also has location and a status:

Restore

Upload the archive first, or name one on a target:
source is then {"upload": "9f6c…"} (kept for a day) or {"target": 3, "file": "dnz-backup-…zip.enc"}.
answers with the manifest (when, which DNZ and schema version, which database, zones, files), the plan (zones_added, zones_removed, zones_changed with record counts, zones_same, users_added, users_removed, tables whose row counts change), warnings, and has_data with the confirm word when the database has users or zones.
answers with rows, tables, files put back, pre_restore (where the data from before was saved) and setup_needed. Every session is signed out. One zone, previewed with "apply": false and restored with "apply": true, as a new version of its history (a change request with HTTP 202 when the zone needs approval):