sqlite3_rsync copies SQLite database snapshots over SSH
Simon Willison highlights that the tool needs no full local copy, which matters when more than half the disk is already used.
SQLite's sqlite3_rsync tool can copy a database snapshot to another machine over SSH. According to Simon Willison, it does this without first creating a full local copy. The tool has been in SQLite since October 2024, and Willison says he only now understood this advantage.
The usual ways to take a snapshot are the backup API or VACUUM INTO. Both need enough free disk space for a duplicate of the database, Willison writes. On a small instance that already uses more than half of its disk, neither option works.
sqlite3_rsync also synchronizes an existing copy without sending the whole database over the network again. Willison says it works much like regular rsync. The origin answers with the content of pages that differ. When a hash covering several pages fails to match, it asks for hashes of smaller groups.
If the two copies start out vastly different, the hash exchange can push total network bandwidth above the size of the database. SQLite 3.47.0 introduced the tool as experimental in October 2024, and SQLite 3.50.0 improved it in May 2025. Willison added that he had already written about this use of the tool in October 2024.
