Note: JSONL import/export commands are planned. This runbook documents the intended recovery steps once JSONL sync is implemented.
- DB corruption detected (PRAGMA integrity_check fails)
- JSONL parse failure
- Mismatched version markers
- Acquire sync lock (<data_dir>/sync.lock)
- Validate source of truth (SQLite for normal ops)
- Rebuild target store (JSONL from DB, or DB from JSONL if DB is corrupt)
- Update version markers in both stores
- Verify counts/hashes
- Release lock
- cass export-jsonl # SQLite -> JSONL snapshot
- cass import-jsonl # JSONL -> SQLite rebuild