Restore contract
Runs backup → restore → smoke queries in CI to verify your restore path works.
What it catches
- Backup command fails or produces empty output
- Restore command fails
- Critical tables empty after restore
Example config
version: 1
contracts:
- type: restore
backup_command: pg_dump $DATABASE_URL -Fc -f /tmp/backup.dump
restore_command: pg_restore -d $RESTORE_DATABASE_URL /tmp/backup.dump
smoke_queries:
- SELECT count(*) > 0 FROM users
command_env:
DATABASE_URL: DATABASE_URL
RESTORE_DATABASE_URL: RESTORE_DATABASE_URL
severity: high
CLI
npx prodverdict check restore --config prodverdict.yml
Requires Postgres client tools (pg_dump, pg_restore) in the runner. Set DATABASE_URL and
RESTORE_DATABASE_URL in CI secrets.
Not available on remote MCP — restore runs in your CI only.