Lilith.
⌕
Editorial illustration: sqlite3_rsync copies a live database over SSH without a second local copy
Lilith illustration · editorial remix

sqlite3_rsync can create a consistent copy of a live SQLite database over SSH without first storing a complete snapshot beside the source file. On a small server with a nearly full disk, that is the difference between a workable backup and a procedure that does not fit.

A consistent snapshot moves directly from origin to replica

The command takes an origin and a replica path, and one side may use the form USER@HOST:PATH. Both databases can remain open during transfer. Applications may write to the origin and read from the replica, which ends up representing a consistent instant at the start of synchronization.

The tool arrived as an experimental part of SQLite 3.47.0 in October 2024. Version 3.50.0 in May 2025 removed the requirement for WAL mode and equal page sizes at both ends. The current attention therefore does not mark a new product. It highlights an existing utility whose most useful property stayed outside the usual SQLite workflow.

Page hashes save both disk space and network traffic

The backup API and VACUUM INTO normally create another complete copy first. That becomes impossible when the database already occupies more than half of the available disk. sqlite3_rsync sends data directly to the destination and, on later runs, compares cryptographic hashes of pages or page groups. It transfers only content that differs.

SQLite’s documentation says network traffic can fall below 0.01% of database size when origin and replica are similar. In its test, a 500 MB database typically synchronized with about 20 KB of traffic. When the databases differ substantially, hash overhead can instead exceed the full database size by a few percent.

The replica is not a cluster and cannot accept writes during transfer

The name invites comparison with ordinary rsync, but rsync does not understand SQLite transactions and may combine pieces from different states when it copies an active file. sqlite3_rsync avoids that problem, yet it still handles one database per invocation. The replica is read only during synchronization, and both endpoints cannot be remote at the same time.

The executable must be available on both local and remote machines. An older version combination also has a protocol negotiation bug: a local 3.50.0 or later client with a remote 3.49.1 or earlier binary may hang. The documentation recommends current versions at both ends or the --protocol 1 option as a workaround.

Restore drills and automation will decide whether the utility becomes operational routine

The next important step is operational discipline rather than copy speed. Teams need to test restores regularly, monitor replica age and ensure that the remote account and SSH keys have only the permissions they need. A consistent snapshot is the foundation of a backup, not a complete recovery policy.

The practical test is straightforward: synchronize a larger live database, isolate the replica from the application and actually start the service from it. If that process fits automation and the required recovery time, sqlite3_rsync can remove a surprisingly expensive free space requirement.

Lilith's verdict

sqlite3_rsync does one boring thing correctly: it carries a live database off a crowded server without tearing a transaction in half. That is the kind of utility that saves the night while a grand platform merely reports a full disk.