Skip to content

docs(ops): fix rollback runbook — no sqlite3 CLI on the deploy host - #46

Open
DanielGGordon wants to merge 1 commit into
mainfrom
t3code/runbook-sqlite-fix
Open

docs(ops): fix rollback runbook — no sqlite3 CLI on the deploy host#46
DanielGGordon wants to merge 1 commit into
mainfrom
t3code/runbook-sqlite-fix

Conversation

@DanielGGordon

Copy link
Copy Markdown
Owner

Follow-up to #45.

Every command in docs/operations/rollback-2026-07-27-sync.md shelled out to sqlite3, which is not installed on the deploy host. A runbook you only discover is broken during an incident is worse than no runbook.

Replaced with Node 24's built-in node:sqlite, and switched the database backup from .backup to VACUUM INTO — safe against a live WAL database and yields a consistent single-file snapshot.

Verified by actually taking the pre-deploy backup rather than just editing the doc:

~/backups/t3-pre-sidebarv2-2026-07-27/
  state.sqlite      334 MB — reads back at ledger 33/ProjectionThreadRestartRequest, 202 threads
  settings.json     all provider instances (not in git)
  keybindings.json
  secrets/

🤖 Generated with Claude Code

Every command in the runbook shelled out to `sqlite3`, which is not installed
here. Replaced with Node 24's built-in node:sqlite, and switched the database
backup from `.backup` to `VACUUM INTO`, which is safe against a live WAL
database and yields a consistent single-file snapshot.

Verified end to end by taking the actual pre-deploy backup:
~/backups/t3-pre-sidebarv2-2026-07-27/ — 334 MB snapshot reading back at
ledger 33/ProjectionThreadRestartRequest with 202 threads, plus settings.json,
keybindings.json and secrets/ (none of which are in git).
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant