Skip to main content

walsync

Lightweight SQLite WAL sync to S3/Tigris.

Like Litestream but:

  • ~7MB binary (vs Litestream's runtime overhead)
  • Watch multiple databases at once
  • Minimal memory footprint (~5-10MB RSS)

Installation

cargo install walsync

Quick Start

# Watch databases and sync to S3
walsync watch db1.db db2.db -b s3://my-bucket/backups

# With Tigris endpoint
walsync watch app.db -b s3://my-bucket --endpoint https://fly.storage.tigris.dev

# Take immediate snapshot
walsync snapshot app.db -b s3://my-bucket

# List backed up databases
walsync list -b s3://my-bucket

# Restore database
walsync restore mydb -o restored.db -b s3://my-bucket

How It Works

Local:                          S3:
app.db                          /app/snapshots/20240110120000.db
app.db-wal  ────────────────►   /app/wal/00000001-20240110120001234.wal
           (file watcher)       /app/wal/00000001-20240110120005678.wal
                                /app/state.json
  1. Watch - Monitor WAL files for changes (inotify/kqueue)
  2. Sync - Upload new WAL frames to S3 incrementally
  3. Snapshot - Periodic full database snapshots (configurable interval)
  4. Restore - Download snapshot + replay WAL segments

Commands

walsync watch

Watch databases and continuously sync WAL changes.

walsync watch <DATABASES>... -b <BUCKET> [OPTIONS]

Options:
  --snapshot-interval <SECS>  Snapshot interval (default: 3600)
  --endpoint <URL>            S3 endpoint (for Tigris/MinIO)

walsync snapshot

Take an immediate snapshot.

walsync snapshot <DATABASE> -b <BUCKET>

walsync restore

Restore a database from S3.

walsync restore <NAME> -o <OUTPUT> -b <BUCKET>

Options:
  --point-in-time <ISO8601>  Restore to specific time

walsync list

List backed up databases.

walsync list -b <BUCKET>

Environment Variables

  • AWS_ACCESS_KEY_ID - AWS/Tigris access key
  • AWS_SECRET_ACCESS_KEY - AWS/Tigris secret key
  • AWS_ENDPOINT_URL_S3 - S3 endpoint (for Tigris/MinIO)
  • AWS_REGION - AWS region (default: us-east-1)

S3 Layout

s3://bucket/prefix/
├── dbname/
│   ├── snapshots/
│   │   ├── 20240110120000.db
│   │   └── 20240110130000.db
│   ├── wal/
│   │   ├── 00000001-20240110120001234.wal
│   │   ├── 00000001-20240110120005678.wal
│   │   └── ...
│   └── state.json
└── otherdb/
    └── ...

Use with Tenement/Slum

Perfect for backing up tenant SQLite databases:

# In your tenement deployment
walsync watch \
  /var/lib/ourfam/romneys/app.db \
  /var/lib/ourfam/smiths/app.db \
  /var/lib/ourfam/jones/app.db \
  -b s3://backups/ourfam \
  --endpoint https://fly.storage.tigris.dev

License

Apache 2.0

Metadata

Release files for walsync 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for walsync 0.1.1
File Size Uploaded Provenance Actions
walsync-0.1.1.tar.gz 33.4 kB Without provenance Details for walsync-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for walsync 0.1.1
File Interpreter ABI Platform Actions
walsync-0.1.1-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for walsync-0.1.1-cp312-cp312-macosx_11_0_arm64.whl

Total release size: 3.3 MB

Release files / walsync-0.1.1.tar.gz

Download URL walsync-0.1.1.tar.gz
Size 33.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8e1816def3a33ae749207fdb056bf1382bef1dd4c5cfbd36239a695edffec88e
BLAKE2b-256 checksum
How to use checksums
85de15cf16286c4fb2d29ef4acb16f57b7e596b03d2e3763309f207f73c5c88d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.10.2

Release files / walsync-0.1.1-cp312-cp312-macosx_11_0_arm64.whl

Download URL walsync-0.1.1-cp312-cp312-macosx_11_0_arm64.whl
Size 3.3 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e8c6b37c7b9696d9bf1835ed32694755536acd10fab123f583761170b5b3c20a
BLAKE2b-256 checksum
How to use checksums
2dfa7350a269e202d4a22e145636922c2e069abc2ce9fd92c5f3d24fd6d1815f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.10.2

Security for walsync 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page