Copying a SQLite file while an app is writing to it can give you a broken copy. SQLite has its own backup command.
sqlite3 app.db ".backup /backup/app-$(date +%F).db"
sqlite3 app.db "VACUUM INTO '/backup/app-small.db'"
.backup uses SQLite’s backup API, so the copy is consistent even while other connections write. VACUUM INTO (SQLite 3.27 and newer) writes a compacted copy and also leaves the original untouched.
In WAL mode the recent changes sit in a separate app.db-wal file, so a plain cp app.db can miss them. If you must copy files, stop the app first or use one of the two commands above.
Further reading: SQLite: Command Line Shell