Why this matters
SQLite in WAL mode is the default choice for small SaaS side projects, but copying app.db with cp while writers are active can produce a torn file. The built-in sqlite3.Connection.backup() API is the only safe way to snapshot a live database — it copies
...