replicare

replicare is an open-source data replication daemon. Point it at a source database and one or more target databases: it makes an initial copy of the selected data, then keeps replicating inserts, updates and deletes so the targets stay in step with the source.

It is written in Go and ships as a single static binary. Postgres, MySQL and Redis are supported, each replicating to the same engine. The source code is on GitHub.

Why it's different

  • No privileged change stream required. replicare does not need the Postgres WAL, the MySQL binlog or a Redis change feed. On Postgres and MySQL it captures changes with ordinary, grantable privileges using triggers; on Redis it uses SCAN reconciliation and writes nothing to the source. So it works on managed databases and old servers where logical replication isn't available.
  • Least privilege. On the source it needs CREATE on the database (or a pre-created schema it owns) plus USAGE, TRIGGER and SELECT. On the target, just SELECT, INSERT, UPDATE and DELETE on tables that already exist. See the grant scripts.
  • Faithful transport, never transform. Values move verbatim and are validated by the target database itself. replicare never coerces, truncates or "repairs" data: on a type or constraint error it stops loudly instead of corrupting silently.
  • Handles very large and very old sources. Change capture starts first, then a chunked, parallel copy runs while changes queue up and reconcile, so there is no single frozen snapshot and "too big to snapshot" isn't a problem. Source-side SQL stays compatible back to Postgres 9.x.
  • Observable. Prometheus metrics, a status HTTP API, structured logs and OpenTelemetry traces, plus a status command that works without any monitoring stack.

Where to start

Engines

The shared pages describe the relational baseline using Postgres; each engine page covers that engine's specifics.

  • Postgres — the reference engine: trigger capture, faithful COPY, foreign-key groups, cyclic and self-referencing tables, least-privilege grants.
  • MySQL — MySQL→MySQL: InnoDB and local_infile requirements and the two operational wrinkles.
  • Redis — Redis→Redis: capture-less SCAN reconciliation, the delete sweep, value-faithful DUMP/RESTORE, TTL, cluster and ACLs.

Active-active

Elsewhere in the repository

Deployment files live in deploy/: a sample systemd unit, the least-privilege grant SQL and the Redis ACL presets. Runnable end-to-end demos are in examples/ (Postgres, MySQL, Redis); one config that runs a Postgres and a Redis pipeline together is examples/postgres-and-redis.yml. Load-and-verify harnesses that drive heavy write traffic and check the target converges are documented for Postgres, MySQL and Redis; see Operations → Load & convergence testing.