Oddbean new post about | logout
 We use https://litestream.io/ from https://fly.io/ to run streaming backups to S3 for databases hosted on Datasette Cloud

@381a127a extracted this out into a new datasette-litestream plugin, which makes it really easy to configure any Datasette instance to backup its databases 
 @381a127a The plugin is really neat: it bundles the correct Go binary for your platform inside the Python package, which means "datasette install datasette-litestream" is all you need - configure it with some S3 credentials and it can start streaming your SQLite data to an S3 backup 
 @4ebb1885 @381a127a do you have to configure some form of limiting concurrency, or does it handle fork and merge of databases? 
 @2561ebcb @381a127a datasette-litestream doesn't give you multi-leader writes, or even read-replicas - it's purely a disaster recovery mechanism, which gives you a recoverable S3 backup from a few seconds ago if something goes wrong

LiteFS will provide read-replicas, but still only a single writer

If you want multi-writers I suggest looking into things like cr-sqlite: https://til.simonwillison.net/sqlite/cr-sqlite-macos