3 ms·
Litestream author here. I haven't personally tried Syncthing on SQLite databases but I suspect it wouldn't work well. Syncthing doesn't have any concept of SQLi
by benbjohnson 3y ago
Litestream author here. I haven't personally tried Syncthing on SQLite databases but I suspect it wouldn't work well. Syncthing doesn't have any concept of SQLite's locks so even in the best case scenario where you only have one writer and the replica is read-only, the reader on the replica would have pages changed out from under it by Syncthing and that would appear corrupt to the reader.
One case where you could make it work is if you sync'd across multiple computers but only used one at a time. I mean, it's still dangerous but it seems possible.
- alexbezhan 3y agoWhat if I do sqlite backup with cron and then sync the backup?
- benbjohnson 3y agoIf you're just using the sync'd version as read-only or as a backup then I suspect that's fine. It seems kinda complicated but you should be ok. :)