SQLite Backups: Remember WAL
Start with the connection settings
The site enables SQLite WAL mode and foreign-key checking. The data directory can therefore contain WAL files alongside the main database. A familiar filename alone is not enough to identify a complete snapshot.
Ask SQLite to create the copy
The backup script opens source and destination SQLite connections and calls source.backup(target). It then archives the resulting database with media files. Source and destination use different paths, and connections should be closed after use.
Different exports serve different purposes
A JSON export helps inspect content and settings. A database backup preserves database state. Media needs its own archive.
Consider restoration too
Try opening the backup and reading records in an independent location before replacing live data. A file existing is only the beginning of a useful recovery process.