Database Rollback Plan

This rollback plan is preparation only. Production is currently already on JSON, so no database rollback is needed today.

Rollback Source

Verified JSON backups remain the rollback source. chain.json, pending.json, domain JSON files, backend app-state JSON, and audit exports must be preserved during any future migration window.

Shadow Rehearsal

The PostgreSQL shadow rehearsal does not need production rollback because it never switches production storage and never writes to source JSON files. If a rehearsal fails, drop the temporary shadow database objects and keep production on JSON.

Rollback Requirements

Rollback Steps For A Future Cutover

  1. Stop database-backed writes.
  2. Restore the previous JSON-backed service configuration.
  3. Restore verified JSON files only if the active files were changed during cutover.
  4. Restart services and verify /api/storage/health, /api/indexes/health, /api/readiness, and public explorer routes.
  5. Rebuild derived indexes from JSON if needed.
  6. Publish an incident note if users were affected.

Never Rewrite

Never rewrite historical blocks, block hashes, transaction order, proof data, or raw historical transaction payloads while rolling back.

Related