Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's just a single file. Easier to backup than any other database.

Also I don't think any cloud provider/database provides an always up to date backup other than a standby replica (which isn't also a backup exactly).



If I remember the "ways to corrupt SQLite databases" page discussed a few days ago, backing up SQLite isn't entirely trivial. By default there are up to three files that have to be copied simultaneously, else you risk corruption. The optimum is to run the backup command to create a copy, but that requires realizing this exists.


If you do find the link could you please share it here. I think I've been hit by it once before.

Also, it's comparatively simpler than other DBMS's like Postgres or MySQL.



Thanks. Useful information.

But I've been copying after taking a shared lock on the sqlite db and I think that's supported as mentioned on https://www.sqlite.org/backup.html.

The online backup API is nice but it has to be done in-process or through a dedicated application. While the lock and file copy is very easy to do using whatever shell the OS provides.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: