opschain admin database export
Included from Basic tier
Exports the estate's DEFINITIONS as one zip — a streamed GET of
/api/admin/database/export, the system-scope extension of
admin nodes export. Refuses while the system is not quiesced
(the archive must describe a database that is not moving); run
opschain admin platform quiesce first. The CLI verifies the downloaded zip
opens and carries an estate manifest before reporting success — a mid-stream
server failure truncates the archive and is caught, never passed silently.
Archive layout:
manifest.json— format, server version/commit, schema level, the quiesce posture, the project list, per-type counts, what was excluded, and a content digest;projects/<code>/definitions/...— each live project subtree in the exactadmin nodes exportlayout (nodes, git remotes sans credentials, templates and versions as git coordinates, workflows, triggers, properties/settings values);--with-historyaddsprojects/<code>/history/*.jsonl(run/step metadata and events) and the document version trails;system/users.json,system/groups.json— accounts (never a password hash) and local group memberships;system/authorisation.json— every authorisation rule by value, every policy with its rule names and assignments;system/global_settings.json— the global settings document with every secured value stripped and the stripped paths recorded;system/maintenance_windows.json— the scheduled (future) windows.
Secret values are ALWAYS excluded: git remote
credentials, secured settings values and password hashes never travel;
secret-vault:// references travel as references. Runtime state (runs,
steps, logs, events, artifacts) stays out of the default archive.
Flags
| Flag | Meaning |
|---|---|
--server <url> | Server base URL (default: the active context / OPSCHAIN_SERVER). |
--auth-token <token> | Admin bearer token override (default: your opschain login session, then $OPSCHAIN_ADMIN_TOKEN, then the token stored by opschain admin login). |
--out <file.zip> | Write the archive to this file (default opschain-estate-export-<timestamp>.zip). |
--with-history | Add run-history JSONL lanes and properties/settings version trails per project. |
Exit codes
| Code | Meaning |
|---|---|
| 0 | Archive downloaded and verified. |
| 1 | The system is not quiesced (409), the store is not PostgreSQL (422), the download truncated, or the request failed. |
| 2 | Usage error — no server or no credential resolvable. |
Examples
opschain admin database export --out estate.zip
opschain admin database export --out estate.zip --with-history
See also
opschain docs cli/admin-database-import— merging the archive into a server.opschain docs cli/admin-nodes-export— the single-subtree export this extends.opschain docs cli/admin-platform-quiesce— opening the export window.