~/siphon

backup · restore · sync · cdc

Sync any database,
anywhere.

One binary that turns the painful sprawl of pg_dump → pg_restore shell scripts into a guided, observable workflow — across PostgreSQL, MySQL, and MariaDB.

siphon — zsh
$ siphon backup proddumping  ████████████  donewrote dump 01JC8…  (sha256 verified)$ siphon sync prod stagingprod ──▶ staging   streaming, no temp filerestored  •  42 tables  •  1.3 GB$ siphon cdc prod replicafollowing changes…  applied 318 (live)$ 

how it flows

Three verbs, one conduit

01

Point at a source

A connection string or a saved profile. siphon introspects the schema and picks the right driver — Postgres, MySQL, or MariaDB.

$ siphon backup prod
02

siphon moves it

Dump, stream, or tail. Everything flows through a bounded buffer with backpressure, checksums, and a live progress view.

$ siphon sync prod staging
03

Land it anywhere

Restore to another database, a different engine, or object storage. The base→incremental chain replays in order, verified end to end.

$ siphon cdc prod replica

what it does

transfer

Stream prod to staging, no temp file

siphon sync pipes a backup straight into a restore through a bounded buffer. A failed dump never lands as a clean restore — backpressure and failures propagate end to end.

incremental

Capture only what changed

backup --incremental records a bounded change set since the base via Postgres logical decoding or MySQL/MariaDB binlog. restore replays the base→incremental chain in order.

cross-engine

Postgres → MySQL, and back

Typed schema introspection pivots through a canonical model, so data and table structure move between engines with per-engine quoting and bound parameters.

cdc

Follow changes continuously

siphon cdc tails the source's change stream and applies each change to the target — same-engine or cross-engine — with a snapshot→stream handoff and resumable state.

integrity

Every dump is checksummed

SHA-256 over the envelope and body, recorded in a sidecar. siphon verify re-hashes and fails with a distinct exit code, so CI catches corruption or tampering.

ops

Cloud storage, retention, audit, 2FA

Keep dumps in S3, prune whole chains by keep-last / max-age / GFS, log destructive ops, and gate them behind a typed confirmation or a TOTP code per profile.

speaks natively

First-class drivers for each engine — same commands, engine-aware quoting, types, and change capture under the hood.

PostgreSQLMySQLMariaDB

install

Up and running in one line

Linux · macOS

Homebrew

Scoop (Windows)

Prefer source? go install the module, or grab a prebuilt binary from Releases. Every archive has a SHA-256 checksum, and the checksum file is cosign-signed.

built by

Made by Nikhil Rajput

Open-source engineer working across databases, CLIs, and developer tooling. siphon is one of several projects — the rest live on GitHub.

Followers
Total stars
Public repos

Top repositories

support

Free and open source

siphon is free to use. If it saves you time, you can support its continued development — every bit helps and is genuinely appreciated. ❤️

GitHub SponsorsKo-fiBuy Me a CoffeeOpen Collective