3 ms·
Seems like that would have the same problems if you do it while transactions are ongoing.
by egdod 7y ago
Seems like that would have the same problems if you do it while transactions are ongoing.
- tgsovlerkhgsel 7y agoGiven that the DB is designed to survive power outages (even during transactions), I don't really understand how that would be the case.
- dunham 7y agoI believe they are subtly different. If you copy while transactions are ongoing, you're reading different parts of a file at different points in time. For example, the beginning of the sqlite3 has already been copied, but by the time you get to the log file, blocks have been committed back into the beginning of the sqlite file. If you take a consistent snapshot of the filesystem first, I would think that would be the same as a crash in the middle of a transaction. Things should be in a consistent state that the recovery code at startup can handle.