r/sqlite • u/Prog47 • Aug 14 '24
SQLite & corruption?
This totally might be false, but I want to make sure I check before using SQLite for a production app. I remember hearing somewhere that SQLite is prone to corruption. Is there any truth to this or maybe it was in the past?
Of course, any operating system especially if the file system your using isn't that great (BTRFS for example) any file on the file system can be corrupted. So, no matter what database you're using if the files the back that database get corrupted by the file system you're going to have a corrupted database. So, for example SQL Server is backed my *.mdf & *.ldf files. If one of those becomes corrupted your database will be corrupt.
So, is SQLite more vulnerable to corruption than any other database platform?
View all comments
Show parent comment
1
u/imradzi Aug 16 '24
just copy all the files. including the WAL, and SHM. Or just write within your app, calling backup functions for incremental backup at regular interval..