Skip to content

Quick Start

Lightweight SQLite WAL sync to S3 in Rust.

Walsync is built for control, efficiency, and Rust-native integration.

You own the code. No black box, no surprises. If you need a custom feature or fix, you can implement it. Walsync is designed to be hackable and transparent.

Walsync’s Rust implementation has a smaller memory footprint:

Measured overhead:

  • walsync: ~12 MB baseline
  • Litestream: ~33 MB baseline

For resource-constrained environments (small VMs, containers, edge deployments), this difference matters.

Walsync integrates naturally into Rust projects:

  • Native async/await with tokio
  • No CGO dependencies
  • Smaller binary size (~8 MB)
  • LTX format compatible with Litestream

Terminal window
cargo install walsync
Terminal window
pip install walsync
Terminal window
walsync --version

Configure your S3 credentials. Example for Tigris (Fly.io):

Terminal window
export AWS_ACCESS_KEY_ID=tid_xxxxx
export AWS_SECRET_ACCESS_KEY=tsec_xxxxx
export AWS_ENDPOINT_URL_S3=https://fly.storage.tigris.dev

See S3 Providers for AWS, R2, MinIO, and other providers.

Back up your database to S3:

Terminal window
walsync snapshot myapp.db --bucket my-backups

Output:

Snapshotting myapp.db to s3://my-backups/myapp.db/...
✓ Snapshot complete (1.2 MB, 445ms)
Checksum: a3f2b9c8d4e5f6a7...

Continuously sync WAL changes:

Terminal window
walsync watch myapp.db --bucket my-backups

This watches for database changes and syncs them to S3. Run this as a background service in production.

Restore a database from backup:

Terminal window
walsync restore myapp.db --bucket my-backups -o restored.db

Output:

Restoring myapp.db from s3://my-backups/...
Downloading snapshot... done (1.2 MB)
Verifying checksum... ✓
✓ Restored to restored.db

Sync multiple databases with a single process:

Terminal window
walsync watch app.db users.db analytics.db --bucket my-backups

Run a local read replica that polls S3 for changes:

Terminal window
walsync replicate s3://my-backups/myapp.db --local replica.db --interval 5s

Output:

Replicating s3://my-backups/myapp.db -> replica.db
Poll interval: 5s
Press Ctrl+C to stop
Bootstrapped from snapshot: 1024 pages, TXID 100
[10:30:05] Applied 1 LTX file(s), now at TXID 101

The replica auto-bootstraps from the latest snapshot if it doesn’t exist, then applies incremental updates.