Advantages of Litestream over https://sqlite.org/rsync.html ?

FWIW. We saw this and I started experimenting. A simple case of copying our production database locally a few times. About 1 in 4 times the local database was corrupted after running it. I also experienced very strange command line parsing bugs and different behaviour depending on the name of the local database file.

So I would treat sqlite3_rsync as more of a demo than a stable product right now.

Litestream provides near-real-time offsite replication and point in time recovery, which sqlite3_rsync won't do on its own. You could probably build a litestream-like product based on sqlite3_rsync but it probably won't be as fast or as efficient on storage.

Litestream gives you point in time recovery - you can restore to any snapshot time, not just have a current replica.

The other advantage (or difference) is that you don't need a “server” on the other end, just object storage. Which may come out cheaper.

Could you use it locally and the upload the result to object storage?

I would probably run both litestream and full backups, to get extra safety

Sure. But you'll be transferring the entire file everytime.

The advantage of sqlite3_rsync is that, if on the other end is an SSH server with sqlite3_rsync, you only transfer the changed pages, and still get a “perfect” copy of the file on the other end.

The advantage of Litestream is that on the other end does not need to live a “server,” and still only changes are uploaded. If you do it continuously, you get many points to recover from, and many of those cross reference each other, saving storage space too. On the flip side, you need the tool to restore.