mongosync

researched 2026-05-28T18:41:22.077Z· 22 sources · 10 concepts · skill mongosync

mongosync is MongoDB's official utility for continuous, real-time replication between two MongoDB clusters. It performs a full initial sync followed by change-stream-based CDC (no Kafka, no Debezium)

mongosync — MongoDB's Native Live Migration Tool

1. Architecture — Initial Sync + Ongoing CDC

Topology notes

Migration host sizing

CLI vs config file

Core connection options

REST API surface

`start` body — the essential fields

Basic filters

Regex filters (mongosync 1.6+)

Namespace remapping

Filter immutability

Items mongosync never replicates

Where state lives

Resume rules

When you cannot resume

5. Verification

5.1 Embedded verifier (default, replica sets)

5.2 Hash comparison (dbHash MD5)

5.3 Document counts

5.4 Migration Verifier (`mongodb-labs/migration-verifier`)

Oplog window exhaustion

Network partitions

Schema drift

Stalled progress

Cannot reverse / reverse refused

7. mongosync vs Atlas Live Migration vs Cluster-to-Cluster Sync

Decision rules

Cutover process

Reverse sync — rollback

State machine summary

loadLevel

One mongosync per shard

Index builds

Balancer

Other tuning knobs

10. Security — TLS & x.509

TLS

x.509 auth (recommended for self-managed source ↔ Atlas dest)

Required roles

Network security

Quick-reference checklist for a new mongosync migration

Sources

Children

Frontier under this node: atlas-live-migration-comparison, initial-sync-and-cdc, loadlevel-tuning, mongosync-state-machine, namespace-filtering, oplog-window-sizing, resume-and-checkpoint, reverse-sync-cutover, tls-x509-auth, verification-modes

← the whole tree · 3D view· how to read this page