Skip to content

Litebackup and LiteFS

LiteFS replicates SQLite through a FUSE file system with a primary chosen by Consul. Litebackup needs neither, and keeps every version in your own bucket.

Choose LiteFS when

  • Every node should hold a full copy

    LiteFS replicates each database to all nodes in the cluster.

  • Writes should be forwarded for you

    On Fly.io, the LiteFS proxy sends write requests to the primary.

Choose Litebackup when

  • You want backups and history built in

    Every version goes to your server and your bucket, and you restore any one you keep.

  • You would rather not run FUSE or Consul

    Litebackup reads files through SQLite, and its own server chooses the writer and runs takeovers.

  • You choose which machines get copies

    Start a replica only where it is needed, per database or per prefix.

  • SQLite should write to an ordinary disk

    Nothing sits between SQLite and your file system, so it runs exactly as it was tested.

Try it on your own databases

Runs on any Linux server you already have.

Built on SQLite itself

SQLite is among the most thoroughly tested software in the world: its project keeps about 590 times as much test code as library code, with 100% branch coverage of its core (How SQLite Is Tested). Litebackup is built so your app keeps all of that.

  • Your app keeps its SQLite. It goes on using the official SQLite it already links, with any driver. Litebackup does not replace the engine, load an extension into your app, or change your file format.

  • Litebackup uses SQLite as released. It runs the unmodified SQLite library from sqlite.org and reads your changes only through features SQLite ships and documents.

  • What comes back is plain SQLite. Every replica and restore is an ordinary SQLite file that opens with any driver, and a restore passes SQLite's own quick_check before it finishes.

How they work

  • LiteFS is a FUSE file system that intercepts SQLite's journal and WAL writes. One node is the primary at a time, chosen with leases in Consul, and writes should go to it. Its docs recommend separate off-site backups.

  • Litebackup runs beside your app and sends each change to your own server, which archives it to your bucket and keeps readonly replicas current on the machines you choose. When the writer goes down, a replica takes over.

Differences that matter

  • Backups. LiteFS replicates; backups are a separate concern. Litebackup is a backup with history first, and replicas come from the same backups.

  • Infrastructure. LiteFS needs FUSE and, for automatic failover, Consul. Litebackup needs only its server, for backups and failover alike.

  • Status. LiteFS is pre-1.0 and, per Fly.io's docs, outside their support scope. Litebackup is in preview, with support at support@litebackup.com.