News ·
sqlite3_rsync: Database Remote-Copy Tool For SQLite
Simon Willison highlights sqlite3_rsync, a SQLite tool that copies a database snapshot over SSH without needing a full local duplicate, and syncs existing copies with minimal re-transmission.
Simon Willison revisited sqlite3_rsync, an SQLite remote-copy tool added as experimental in SQLite 3.47.0 in October 2024 and enhanced in SQLite 3.50.0 in May 2025. He says he only recently appreciated one of its most attractive characteristics.
Normally, snapshotting a SQLite database requires the backup API or VACUUM INTO, both of which need enough disk space to duplicate the database, so on a small instance using more than half the disk you are out of luck. sqlite3_rsync instead copies a snapshot over an SSH connection to another machine without first creating a full local copy, and can also synchronize an existing copy without re-sending the whole database. It works like regular rsync: the replica sends cryptographic hashes for pages or page groups to the origin, which returns differing page content or requests finer-grain hashes when a multi-page hash does not match. If the two sides start out very different, bandwidth can slightly exceed the database size due to hash overhead, but only by a few percent at most.
For anyone deploying SQLite-backed AI applications on small instances, this removes the disk-space constraint on taking backups and makes keeping remote copies current cheap over the network.
References
- Simon Willison · simonwillison.net
Read the full story at Simon Willison ↗Like, save or discuss on Buzz


