opschain admin database
Included from Basic tier
Database maintenance, backup readiness and estate export/import:
a per-table health snapshot, on-demand statistics/space maintenance runs, the
DBA-first backup lane, the embedded SQLite backup, and the system-scope
export/import. The scheduled maintenance lanes — periodic analyze and the
weekly vacuum window — are configured in config.yaml's database.maintenance
block; the verbs work whether or not those lanes are enabled.
| Subcommand | Purpose |
|---|---|
status | Per-table size/tuple stats, last analyze/vacuum times, last maintenance runs — opschain docs cli/admin-database-status. |
migrations | Migration integrity: list/status/apply against the migration ledger — opschain docs cli/admin-database-migrations. |
analyze | Run per-table ANALYZE now — opschain docs cli/admin-database-analyze. |
vacuum | Run per-table VACUUM (ANALYZE) now — opschain docs cli/admin-database-vacuum. |
backup-info | Quiesce-gated backup manifest + pg_dump recipe (PostgreSQL) — opschain docs cli/admin-database-backup-info. |
verify-restore | Reconcile a restored store against its manifest — opschain docs cli/admin-database-verify-restore. |
backup | One-zip backup of an embedded SQLite server — opschain docs cli/admin-database-backup. |
restore | Restore that zip into an EMPTY embedded store — opschain docs cli/admin-database-restore. |
export | Quiesce-gated estate definitions archive — opschain docs cli/admin-database-export. |
import | Merge an estate archive through the ordinary create lanes — opschain docs cli/admin-database-import. |
The server-backed verbs authenticate with the admin bearer, resolved like
every fleet verb: --auth-token, then OPSCHAIN_ADMIN_TOKEN, then the token
stored by opschain admin login; the server from --server,
OPSCHAIN_SERVER or the active context. backup and restore are offline
verbs run on the server host (they read the home's config.yaml, like
server backup).
The division of labour is ruling: OpsChain makes the system
safe and verifiable; the DBA moves the bytes. On PostgreSQL the backup lane
is admin platform quiesce → backup-info → the DBA's pg_dump plus the
blobstore copy → admin platform resume; restore is the DBA's pg_restore
into an empty database → verify-restore → resume. Only the embedded SQLite
store gets built-in byte movement.