News for hackers. Stuff that matters.
Re:Consider SQLite by cperciva on Wednesday December 29, 2021 @02:10PM (#29728673)
Be careful! If you copy a database file while it is being modified, you may end up with an inconsistent view of the database depending on the order in which different parts of the file are modified.

There are ways around this (filesystem snapshots and potentially file locking) but it's not trivial and failing to handle this correctly is a very good way to build a system which passes tests under low load (when the file-copying operation will win all the relevant races) but fail catastrophically under heavy load.

Re:Consider SQLite by chasil on Wednesday December 29, 2021 @02:15PM (#29728748)
The sqlite3 utility can be used to create a transaction-consistent backup of a live database. This interface is the only way that a backup should be taken, either from the utility or the C API.

    .backup ?DB? FILE        Backup DB (default "main") to FILE
https://sqlite.org/cli.html