MongoDB
MongoDB 6.0+ replica sets. anybranch dumps once, then applies change-stream events. Nothing is created on the source.
Requirements
- A replica set — change streams need one (Atlas always is; a single-node
rs.initiate()is fine). - A user that can read all databases and open a change stream (Atlas:
readAnyDatabase).
$ anybranch preflight mongodb 'mongodb://user:pass@host:27017/?replicaSet=rs0'How sync works
anybranch takes a change-stream resume token, copies the data with mongodump | mongorestore, then a tailer applies every change as an upsert or delete keyed by _id, so the overlap with the dump is harmless. It replicates index creation and drops, collection creation with options, and collMod. Every branch mongod runs as its own single-node replica set, so transactions and change streams work on branches too.
Failed events
An event the replica cannot apply is logged to run/tail.errors and skipped, never fatal. status shows the tailer state and how many events were skipped; repair restarts the tailer from its last resume token.