Repository navigation
docs(faq): how to recover a malformed SQLite database - #210
TimeToBuildBob wants to merge 1 commit into
Conversation
|
The failed run used stale APT metadata: The replacement Build run is queued on |
|
@greptileai review |
Git-Session-Id: a51c23a1-c0bb-4da7-865c-9d9ec3107471
b1e47b6 to
6e14de6
Compare
|
Merge-ready. FAQ entry for recovering a "database disk image is malformed" SQLite database ( |
Adds a FAQ entry for "database disk image is malformed": quit ActivityWatch, back up
sqlite.dbwith its-wal/-shmfiles, rebuild withsqlite3 .recover(falling back to.dump), restorePRAGMA user_version, and swap the file in.The
user_versionstep matters..dumpdoes not carry it, so aw-server-rust releases before ActivityWatch/aw-server-rust#776 re-ran every migration on the restored file and crashed with a duplicate-column error. #776 (merged today) infers the version, but it is not in a release yet.Two caveats are written in because I hit them while checking the steps. Some
sqlite3builds (Ubuntu's 3.45.1 here) have no.recoverand fail withno such table: sqlite_dbpagewhile still creating an emptyrestored.db. And whether.recoverkeepsuser_versiondepends on the build, so the page says to check for0instead of claiming either way.Maintainers asked for this to be documented in ActivityWatch/aw-server#89.
Verified:
sphinx-buildproduces no warnings infaq.rst(the existing changelog duplicate-label warnings are unchanged).