Connect a database

MongoDB

MongoDB 6.0+ replica sets. snapshotdb dumps once, then applies change-stream events. Nothing is created on the source.

Requirements

$ snapshotdb preflight mongodb 'mongodb://user:pass@host:27017/?replicaSet=rs0'

SnapshotDB Cloud requires a standard mongodb:// seed-list URL with public hosts. Hosted mongodb+srv:// discovery is disabled because its additional destinations cannot yet be safely validated. Ask your provider for the standard connection string, retain its replica-set and authentication options, and set tls=true for a TLS source. BYOC supports SRV discovery inside your own network boundary.

How sync works

snapshotdb 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.