News for hackers. Stuff that matters.
Re:Cron-based backup for SQLite by kijin on Sunday May 15, 2022 @08:46AM (#31387227)
`cp` is not instantaneous. Unless you lock the entire file, one block can change while you're reading another block. You end up with a Frankenstein of a file, compared with a consistent snapshot if you had simply lost power.

If your filesystem supports snapshotting, it would be safe to create a snapshot and `cp` the database off of that snapshot.

There are no comments on this comment yet.