Repolode
benbjohnson

benbjohnson/litestream

Standalone disaster recovery tool that continuously replicates SQLite database changes to another file or S3.

Stars
14,516
Forks
441
Open issues
148
Last commit
11 hours ago

What is it?

Litestream runs as a background process alongside your SQLite database and replicates changes incrementally to a separate file or to S3-compatible object storage. It communicates with SQLite only through the SQLite API, so the source database is not corrupted by the replication process.

The project targets the problem of losing a single-file SQLite database to disk failure, machine loss, or accidental deletion, without moving the application to a server-based database. Restoring a database from a replica is the recovery path it provides.

When replication starts, Litestream creates an internal _litestream_lock table in the source database to coordinate around WAL checkpoints. The README notes that this table is expected, that it is included in backups, and that it should not be dropped while Litestream is running.

Key features

  • 01Incrementally replicates SQLite changes to a file or S3 storage.
  • 02Runs as a standalone background process alongside the application.
  • 03Interacts with SQLite only through the SQLite API.
  • 04Restores a database from a replica for disaster recovery.

Use cases

  • Backing up a single-file SQLite database used by a small web service.
  • Replicating a SQLite database to S3 so it can be restored after a server failure.
  • Running SQLite in containers or on Kubernetes with off-host copies of the data.

Quick start

  1. 1

    Visit the Litestream website for installation instructions

Things to know

  • The project is marked as beta in the README.
  • Litestream creates a _litestream_lock table in the source database, so the database will not stay byte-identical to its pre-Litestream state.

Topics

FAQ

What is litestream?
Standalone disaster recovery tool that continuously replicates SQLite database changes to another file or S3. Litestream runs as a background process alongside your SQLite database and replicates changes incrementally to a separate file or to S3-compatible object storage. It communicates with SQLite only through the SQLite API, so the source database is not corrupted by the replication process.
Is litestream free to use? What license does it have?
litestream is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is litestream still maintained?
Actively maintained. The last commit to litestream was on Oct 21, 2026.
What can I use litestream for?
Backing up a single-file SQLite database used by a small web service. Replicating a SQLite database to S3 so it can be restored after a server failure. Running SQLite in containers or on Kubernetes with off-host copies of the data.
How do I install litestream?
Visit the Litestream website for installation instructions
Where can I get litestream?
The source code and installation instructions are on GitHub: https://github.com/benbjohnson/litestream

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects