opschain admin database backup-info
Included from Basic tier
Verifies the system is QUIESCED and emits the backup manifest — a GET of
/api/admin/database/backup_info. The PostgreSQL backup lane is DBA-first: OpsChain never streams database bytes; it makes the
window safe and records what a complete capture must contain. The lane is
opschain admin platform quiesce → backup-info → the DBA's pg_dump (and
the blobstore copy) → opschain admin platform resume.
The manifest records:
- the server version and commit, and the goose schema migration level;
- exact per-table row counts of the durable tables (stable because the
write barrier is closed), under
tables; the volatile operational tables — replica membership and heartbeats, the named and job leases, runner liveness tokens and challenges, attempt-log ownership, the run inbox — are named undertables_excludedand never counted, because a restored server legitimately holds a different set of them; - the blobstore root path that must be captured alongside the dump, and every blob digest the database references;
- the quiesce posture (id, reason, who, when);
- the blessed pg_dump recipe (custom format), with the CloudNativePG note for HA estates;
- a SHA-256 content digest over the manifest body (recomputed canonically, so re-serialising the file does not break it).
opschain admin database verify-restore later reconciles all of it against
the restored store.
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> | Write the manifest to this file and print a summary; without it the manifest JSON prints to stdout. |
Exit codes
| Code | Meaning |
|---|---|
| 0 | The manifest was emitted. |
| 1 | The system is not quiesced (409), the store is not PostgreSQL (422), request failed, or the token was rejected. |
| 2 | Usage error — no server or no credential resolvable. |
Named errors
the system is not quiesced — the backup manifest describes a database that must not be changing: run 'opschain admin platform quiesce ...'— HTTP 409 (exit 1; there is no warn-and-run lane).the configured store is not PostgreSQL — 'opschain admin database backup --out <file>' and 'restore <file>' are the embedded SQLite lane— HTTP 422 (exit 1).
Examples
opschain admin database backup-info --out manifest.json
opschain admin database backup-info > manifest.json
The full window, in order: quiesce (opschain admin platform quiesce, with a
reason), fetch this manifest, run the pg_dump recipe the manifest prints,
copy the blobstore root it names, then opschain admin platform resume.
See also
opschain docs cli/admin-database-verify-restore— the post-pg_restore reconciliation of this manifest.opschain docs cli/admin-platform-quiesce— opening (and closing) the backup window.opschain docs cli/admin-database-backup— the embedded SQLite lane, where the built-in IS the right tool.