opschain admin database verify-restore
Included from Basic tier
Reconciles the CURRENT store against a backup-info manifest — a POST of the
manifest file to /api/admin/database/verify_restore. Run it after the DBA's
pg_restore, before resuming the system: a database restored from a quiesced
backup comes back still holding the quiesce posture, and this verb is carved
out of the write barrier (it is reads in effect), so it works exactly there.
Checks, each reported pass/fail with a named detail:
manifest_digest— the manifest body matches its own content digest (a tampered or corrupted file fails here first);schema_level— the goose level matches; a NEWER server passes with a note (its migrations replayed on boot), an OLDER server fails (verify and run with a binary at least as new as the one that took the backup);table_counts— every durable table's row count matches, mismatches and missing tables named; the volatile tables (replica membership, leases, runner liveness — the manifest'stables_excluded, and any such count an older manifest recorded) are never compared, and the pass detail lists them so you can see what was left out and why;blobstore— every blob digest the manifest recorded opens in the blobstore the server is running against (the blob root must be captured and restored alongside the database).
The command exits non-zero when any check fails.
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). |
Exit codes
| Code | Meaning |
|---|---|
| 0 | Every check passed. |
| 1 | One or more checks failed (restore verification failed: N of M checks failed), the manifest was malformed, the store is not PostgreSQL, or the request failed. |
| 2 | Usage error — no server or no credential resolvable. |
Examples
opschain admin database verify-restore manifest.json
opschain admin database verify-restore manifest.json -o json
See also
opschain docs cli/admin-database-backup-info— where the manifest comes from.opschain docs cli/admin-platform-resume— reopen the system once the verification passes.