Keeping SQLite backups honest
A copy of a database file taken while the application writes to it is not a backup. It may open fine and still miss the last pages of a transaction. The fix is boring: use the online backup API (sqlite3 db '.backup out.db') or VACUUM INTO, which produce a consistent snapshot without stopping the writer.
The second half of the job is checking the copy. Once a week I restore the newest archive into a scratch directory and run PRAGMA integrity_check plus a couple of row counts against the live database. Two numbers that match are worth more than a green status in a backup tool.
Encrypt before the file leaves the machine. A small tool like age with one public key on the server and the private key offline keeps the server from ever being able to read its own old backups.