r/programming 6d ago

SQLite in Production with Built-In Litestream Replication

https://openrun.dev/blog/litestream/
43 Upvotes

6 comments sorted by

2

u/[deleted] 5d ago

[removed] — view removed comment

4

u/grabthefish 5d ago

and of course there are official docs on how to backup an sqlite db https://www.sqlite.org/backup.html

2

u/Beautiful-Energy2169 5d ago

That one's the C API. From the shell, .backup gives the same snapshot.

2

u/grabthefish 5d ago

It also mentions other backup methods like the VACUUM INTO you mentioned

2

u/avkijay 5d ago

Yes, there are multiple approaches to SQLite backup. Litestream does continuous replication, which allows for things like point-in-time restore (go back to the database state as it was at a specific timestamp).

3

u/programming-ModTeam 4d ago

No content written mostly by an LLM. If you don't want to write it, we don't want to read it.