Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
L

litestream

> 数据库
Open source

Streaming replication for SQLite.

14.2K stars0 likes2 views
WebsiteGitHub

About

Streaming replication for SQLite.

Litestream

==========

Litestream is a standalone disaster recovery tool for SQLite. It runs as a background process and safely replicates changes incrementally to another file or S3. Litestream only communicates with SQLite through the SQLite API so it will not corrupt your database.

If you need support or have ideas for improving Litestream, please visit GitHub Issues. Please visit the Litestream web site for installation instructions and documentation.

If you find this project interesting, please consider starring the project on GitHub.

Source database changes

When Litestream begins replicating a database, it creates an internal _litestream_lock table in the source SQLite database. This is expected and safe to leave in place. Litestream uses the table to acquire SQLite's write lock while coordinating synchronization around WAL checkpoints. The writes occur in transactions that are rolled back, so Litestream does not leave rows in the table.

The table is part of the source database, not a separate table in the replica destination. Because the source schema is backed up, restored databases also contain it. Its creation changes the source database schema and can change its page count or bytes, so a database under Litestream should not be expected to remain byte-identical to its pre-Litestream state.

Do not drop _litestream_lock while Litestream is running. Synchronization around a checkpoint can fail until Litestream reinitializes the database. Restarting Litestream recreates the missing table automatically.

Contributing

We welcome bug reports, fixes, and patches! Please see our Contributing Guide for details on how to contribute.

Security

Please do not open a public issue for security vulnerabilities. Report them privately through GitHub's private vulnerability reporting, which keeps the report visible only to you and the maintainers until a fix is released. See our Security Policy for what to include and what to expect.

Acknowledgements

I want to give special thanks to individuals who invest much of their time and energy into the project to help make it better:

  • Thanks to Cory LaNou for giving early feedback and testing when Litestream was still pre-release.
  • Thanks to Michael Lynch for digging into issues and contributing to the documentation.
  • Thanks to Kurt Mackey for feedback and testing.
  • Thanks to Sam Weston for figuring out how to run Litestream on Kubernetes and writing up the docs for it.
  • Thanks to Rafael & Jungle Boogie for helping to get OpenBSD release builds working.
  • Thanks to Simon Gottschlag, Marin,Victor Björklund, Jonathan Beri Yuri, Nathan Probst, Yann Coleu, and Nicholas Grilly for frequent feedback, testing, & support.

Huge thanks to fly.io for their support and for contributing credits for testing and development!

Issues· 158 open

View all issuesOpen on GitHub
  • #1544

    BUG: litestream-vfs write mode leaks global txid counter across multiple replicas in one process

    bugUpdated Oct 1, 2026
  • #1522

    Nightly stability failure: 2026-10-01T03:07:21.5382795Z --- FAIL: TestMinIOSoak (0.34s); 2026-10-01T03:07:57.5119004Z…

    bugstabilityUpdated Oct 1, 2026
  • #1332

    Boundary snapshot encodes entire database under the SQLite write lock, stalling writers on large databases

    staleUpdated Oct 1, 2026
  • #1333

    Retention never converges on write-idle databases (snapshot dedup + minSnapshotTXID=0 interaction)

    staleUpdated Oct 1, 2026
  • #1543

    Nightly stability failure: 2026-09-29T03:02:24.0551655Z --- FAIL: TestMinIOSoak (0.91s); write ltx file: persistent e…

    bugstabilityUpdated Sep 29, 2026
  • #1542

    FsyncDir fails with "Access is denied" on Windows, so replication stops (v0.5.16+)

    Updated Sep 28, 2026
  • #1541

    POST /sync keeps queued work after the client cancels the request

    Updated Sep 27, 2026
  • #1540

    WAL truncation or salt reset after an external checkpoint can drop committed rows from the replica

    Updated Sep 27, 2026
  • #1198

    Checkpoint triggers unwanted full snapshot under high write load

    bugstaleUpdated Sep 27, 2026
  • #1521

    Nightly stability failure: Malformed job record #4: steps[5].conclusion must be a non-empty string; steps[6].conclusi…

    bugstabilityUpdated Sep 26, 2026

> Tags

Goreplications3sqlite

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库