Backup and restore drill
This commit is contained in:
53
memory/episodic/2026-05-02-state-hub-wsl2-restore-drill.md
Normal file
53
memory/episodic/2026-05-02-state-hub-wsl2-restore-drill.md
Normal file
@@ -0,0 +1,53 @@
|
||||
---
|
||||
id: 2026-05-02-state-hub-wsl2-restore-drill
|
||||
type: restore-drill
|
||||
domain: custodian
|
||||
repo: the-custodian
|
||||
workplan: CUST-WP-0011
|
||||
task: T01
|
||||
created: "2026-05-02"
|
||||
author: codex
|
||||
---
|
||||
|
||||
# State Hub WSL2 Restore Drill — 2026-05-02
|
||||
|
||||
## Summary
|
||||
|
||||
Completed the CUST-WP-0011 T01 pre-migration safety drill. A fresh SQL dump of
|
||||
the live WSL2 State Hub PostgreSQL database was restored into a disposable
|
||||
PostgreSQL 16 container and verified through the State Hub application.
|
||||
|
||||
## Source
|
||||
|
||||
- Live container: `infra-postgres-1`
|
||||
- Source database: `custodian`
|
||||
- Temporary dump artifact: `/tmp/state-hub-restore-drill/state-hub-drill.sql.gz`
|
||||
(removed after verification because it was an unencrypted drill artifact)
|
||||
- Restore container: `state-hub-restore-test`
|
||||
- Restore endpoint: `127.0.0.1:5433`
|
||||
|
||||
## Verification
|
||||
|
||||
- Restore command exited 0.
|
||||
- Production and restored table row counts matched exactly.
|
||||
- State Hub app pointed at the restored DB returned:
|
||||
- `/state/health`: HTTP 200, DB connected.
|
||||
- `/state/summary`: HTTP 200.
|
||||
|
||||
Key restored counts:
|
||||
|
||||
| Table | Rows |
|
||||
|---|---:|
|
||||
| workstreams | 117 |
|
||||
| tasks | 989 |
|
||||
| progress_events | 1423 |
|
||||
| token_events | 208 |
|
||||
| managed_repos | 19 |
|
||||
| sbom_entries | 2257 |
|
||||
|
||||
## Notes
|
||||
|
||||
State Hub does not yet have a dedicated `make backup` / `make restore` target.
|
||||
This drill used direct `pg_dump` and `psql` via Docker, which proves the data
|
||||
path but should be wrapped in first-class commands before the railiance01
|
||||
cutover.
|
||||
Reference in New Issue
Block a user