walsync-0.1.0 is not a library.
Visit the last successful build:
walsync-0.1.1
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
Quick Start
# Watch databases and sync to S3
# With Tigris endpoint
# Take immediate snapshot
# List backed up databases
# Restore database
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
- Watch - Monitor WAL files for changes (inotify/kqueue)
- Sync - Upload new WAL frames to S3 incrementally
- Snapshot - Periodic full database snapshots (configurable interval)
- Restore - Download snapshot + replay WAL segments
Commands
walsync watch
Watch databases and continuously sync WAL changes.
)
)
walsync snapshot
Take an immediate snapshot.
walsync restore
Restore a database from S3.
walsync list
List backed up databases.
Environment Variables
AWS_ACCESS_KEY_ID- AWS/Tigris access keyAWS_SECRET_ACCESS_KEY- AWS/Tigris secret keyAWS_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
License
Apache 2.0