When a database runs with PRAGMA journal_mode=WAL;, recent writes sit inside the -wal sidecar file rather than the main .db file. Running plain cp on the main file alone leaves you with a stale or inconsistent snapshot.
SQLite 3.27+ includes VACUUM INTO, which produces a compacted, self-contained copy without interrupting concurrent readers:
sqlite3 /var/lib/app/data.db "VACUUM INTO '/var/backups/app/data-2026-11-18.db';"
sqlite3 /var/backups/app/data-2026-11-18.db "PRAGMA integrity_check;"
Keeping seven daily snapshots rotated by modification time takes less than ten lines of shell and prevents silent corruption from ever overwriting your last good copy.