-
Notifications
You must be signed in to change notification settings - Fork 6
Add scripts to help identify and recover from DB corruption #264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PR Summary
|
Preview environment removedThe preview for this PR has been cleaned up. |
Integrity checks now run remotely against the live pod via better-sqlite3 (no downtime). Backups use the .backup() API for consistent snapshots without WAL/SHM copying. Recovery is a single pipeline that rebuilds directly on the PVC volume, avoiding slow network transfers of the full DB. - db-common.sh: shared constants and utilities - db-integrity.sh: remote checks via kubectl exec + node -e (readonly) - db-backup.sh: consistent backup via better-sqlite3 .backup() API - db-recover.sh: full pipeline replacing db-rebuild.sh + db-deploy.sh - Fixes wrong PVC name (was data-mod-bot-set-0, now mod-bot-pvc-mod-bot-set-0) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
9878e59 to
7e7ba3e
Compare
|
Example output: $ ./scripts/db-integrity.sh
Database Integrity Report (Remote)
Pod: mod-bot-set-0integrity check $ ./scripts/db-integrity.sh
Database Integrity Report (Remote)
Pod: mod-bot-set-0
Database: /data/mod-bot.sqlite3
Date: Wed Jan 28 13:30:00 EST 2026
recovery $ ./scripts/db-recover.sh
Database Recovery Pipeline
Date: 2026-01-28_133435
|
No description provided.