How I Test Database Restores (So My Backups Actually Work)
A backup you never restore is a folder of bytes. Here is the concrete restore-test routine I run on a schedule — including what to check beyond integrity_check.
A backup you never restore is a folder of bytes. Here is the concrete restore-test routine I run on a schedule — including what to check beyond integrity_check.
Both are excellent SQLite drivers for Go. I pick the pure-Go one. The deciding factors are build, deploy, and portability — not a benchmark table.
In WAL mode a SQLite database is really three files. Backing up only the main file silently loses your newest writes — here is how the pieces fit and how to back up safely.
VACUUM INTO is the safest way to back up and compact a SQLite database while it is running. Here is how it works, when it fails, and why I use it over file copies.
A daily SQLite backup you never have to think about: a systemd timer running VACUUM INTO, plus retention and a restore-test hook. Real config included.
The honest path between 'keep it in SQLite' and 'run your own Postgres': move the part that needs it to a managed database and keep the rest in the file.
I corrupted SQLite databases on purpose and integrity_check passed on one that was actually broken. Here is the verified boundary of what this check can and cannot see.
A practical look at SQLite indexes: when they help, when they hurt, and how to find the queries that actually need one.
The clean ways to get data out of SQLite — JSON via sqlite3 CLI, CSV with proper headers, and the escaping traps that corrupt exports.
The tradeoff between speed and durability in SQLite: what WAL and synchronous=NORMAL actually mean, and when FULL is the right call.