VACUUM INTO: The SQLite Backup Command Most People Skip
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.
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.
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.
Every database incident I have caused traces back to skipping one of these steps. Stop, back up, work on a copy, verify, swap — the ritual that prevents disasters.
A verified, step-by-step recovery of a corrupted SQLite database using VACUUM INTO, integrity_check, and backups — including what SQLite's integrity check can and cannot catch.
Five real mistakes that damage SQLite databases in production, learned the hard way — and the backup and integrity discipline that catches them before they become disasters.