Six tools compared: mongodump, mongosync, Atlas Live Migration, mongomirror, AWS DMS, and mongoexport — internal mechanisms, version compatibility, platform support, pros/cons, caveats, and a decision guide.
Offline binary export/import. Snapshot-based. Classic tool for backups and small-to-medium migrations.
Live cluster-to-cluster sync with continuous CDC. Primary tool for zero-downtime migrations. Officially branded as MongoDB Cluster-to-Cluster Sync.
MongoDB-managed migration service. Same engine as mongosync, operated via Atlas UI. Best for ≤5 TB.
Legacy live migration. Oplog-based tailing. Replaced by mongosync. No new updates.
AWS Database Migration Service. MongoDB as source/target. Oplog-based CDC via replication instance.
JSON/CSV export & import. Human-readable format. Same package as mongodump. Best for small datasets or cross-format transfers.
Self-hosted tools run on your infrastructure. Managed services (Atlas Live Migration, AWS DMS) handle provisioning for you.
| Requirement | mongodump | mongosync | Live Migrate | mongomirror | AWS DMS | mongoexport |
|---|---|---|---|---|---|---|
| Deployment Model | Self-hosted binary | Self-hosted binary | Atlas-managed | Self-hosted binary | AWS-managed replication instance | Self-hosted binary |
| CPU (minimum) | 1–2 cores | 8 CPUs minimum | N/A — Atlas provisions | 2–4 cores (per shard) | N/A — select instance class (dms.r5.large+ recommended) | 1 core |
| RAM (minimum) | 1–2 GB | 24 GB minimum | N/A | 4–8 GB | N/A — instance class dependent (8–32 GB typical) | 1 GB |
| Disk / Storage | ≥ source data size (BSON files written to disk; less with --gzip) | Minimal — streams data, doesn't store. Verifier uses ~0.5 GB per 1M source docs. | N/A | Minimal — streams data | N/A — but larger instance = larger storage for task logs & sort buffers | ≥ source data size (JSON/CSV larger than BSON) |
| Network | Not critical (file-based) | High bandwidth essential — streams all data over network. Low-latency link to both source and dest. | Atlas manages connectivity; you provide VPC peering / PrivateLink | High bandwidth to Atlas destination | Within AWS VPC; cross-region adds latency | Not critical (file-based) |
| Architecture | 64-bit (x86_64, ARM) | 64-bit (x86_64, ARM) | N/A | 64-bit (x86_64, ARM, ppc64le, s390x) | N/A | 64-bit (x86_64, ARM) |
| Scaling Guidance | Add --numParallelCollections (default 4) for faster dump. More CPU/RAM helps parallelism. | Single binary handles all. More CPU helps change stream processing and index builds. | Atlas auto-scales. ≤5 TB / ≤3 shards. | One instance per replica set migration. | Choose larger instance class (dms.r5.xlarge, 2xlarge) for high-throughput CDC. | Single-threaded per collection. Script parallel runs for multiple collections. |
What happens when things go wrong — and how each tool recovers. Covers self-hosted tools and managed services.
No resume. An interrupted mongodump produces a partial dump — some collections complete, others missing or truncated. mongorestore on a partial dump will insert whatever is there but the dataset is incomplete.
Delete partial output and re-run. For huge datasets, dump individual databases/collections separately so a failure only requires re-dumping one piece.
--archive | gzip > backup.gz to pipe directly — avoids running out of disk mid-dump--db per runBuilt-in 30-minute retry window (v1.18+). Transient network/cluster errors are retried automatically. If mongosync process crashes, state is persisted on the destination cluster in mongosync_reserved_for_internal_use database.
Resume via API: Restart the mongosync binary and call POST /api/v1/resume. It picks up from where it left off using state on the destination. Takes ~2 min to re-enter RUNNING state. No data loss, no re-copy.
systemd with Restart=on-failure/api/v1/progress — watch estimatedOplogTimeRemaining/resumewarnings field in progress API (v1.19)No resume, no retry. If mongomirror crashes or loses connection, the migration stops. If the oplog rolls over before you restart, you must start from scratch — drop destination data and re-run.
Restart mongomirror with same arguments. If initial sync had completed and oplog hasn't rolled over, it resumes tailing. Otherwise: clean destination, re-run from scratch.
renameCollection or $out during migrationAtlas manages retries internally using the same mongosync engine. Transient errors are retried automatically. However, you have zero visibility into retry logic — no logs, no retry count, no timeout configuration.
If migration fails: Atlas shows a failure banner in the UI. There is no resume — you must restart the migration from scratch via the Atlas UI. Destination data from the failed attempt must be cleaned up (Atlas handles this on restart).
Multi-AZ failover available. If the replication instance fails, Multi-AZ automatically provisions a standby and fails over. For CDC tasks, DMS stores a checkpoint — but if the source oplog rolls over before recovery, the CDC stream is broken and a full-load restart is required.
Stop and restart the task. CDC tasks resume from the last checkpoint. Full-load tasks restart from scratch. Use cdc-start-position to manually set oplog resume point if needed. Table statistics in the console show per-collection progress.
CDCLatencyTarget and CDCIncomingChangesdms.r5.xlarge+ for production workloadsNo resume. An interrupted mongoexport produces a truncated JSON/CSV file. mongoimport on a truncated file will fail on the malformed last line but import everything before it.
Delete partial output and re-run. For mongoimport, use --mode=upsert to safely re-import without duplicates. One collection at a time, so failures are scoped.
--query to break large collections into chunksgzip to reduce disk usageThe migration mechanism — oplog, change streams, or query cursor — determines capabilities and limitations.
find({}) scan). Each collection serialized to BSON files. Metadata stored as JSON sidecar files.--oplog captures oplog entries during dump for point-in-time consistency. Without it, the dump is not consistent if writes are happening.--oplogReplay replays captured entries for point-in-time.--oplog used. Transfer is via files, not network streaming.commit via API.local.oplog.rs. Replays oplog entries on destination in real-time._doc JSON column) or table mode (flattened).find). Outputs one document per line as Extended JSON or CSV. No BSON — human-readable text format.--mode=upsert for idempotent re-imports. No index migration — manual rebuild required.Toggle tools in the filter bar to focus your comparison.
| Capability | mongodump | mongosync | Live Migrate | mongomirror | AWS DMS | mongoexport |
|---|---|---|---|---|---|---|
| Mechanism | Query cursor + oplog | Change streams | Change streams (hosted) | Direct oplog tailing | Query scan + oplog | Query cursor → JSON/CSV |
| Zero-Downtime | ✗ Offline | ✓ | ✓ | ✓ | ✓ | ✗ Offline |
| Continuous CDC | ✗ Snapshot | ✓ Until commit | ✓ Until cutover | ✓ Until stop | ✓ Ongoing | ✗ Snapshot |
| Collection Filtering | ✓ --db --collection --query | ✓ includeNamespaces + regex | ✓ Inherits mongosync | ✗ Full cluster | ✓ Table mappings | ✓ --db --collection --query |
| Sharded Clusters | ✓ Per-shard or mongos | ✓ Full (mismatched OK) | ✓ ≤3 shards | ✗ Replica sets only | △ Limited | ✓ Via mongos |
| Pause / Resume | ✗ | ✓ API | ✗ | ✗ | ✓ Task stop/start | ✗ |
| Index Migration | ✓ Metadata + rebuild | ✓ Parallel batched | ✓ | ✓ | ✗ Manual | ✗ Manual |
| Queryable Encryption | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
| Direction | Any → Any | Any → Any | Any → Atlas | Any → Atlas | Any → Any (AWS) | Any → Any |
| Multi-Cloud | ✓ Portable files | ✓ Cross-cloud | △ Dest = Atlas | △ Dest = Atlas | ✗ AWS only | ✓ Portable files |
| Compression | ✓ --gzip / --archive | ✓ Wire | ✓ Auto | ✓ Wire | △ Depends | ✗ Pipe to gzip |
| Monitoring | ✗ Stdout | ✓ /progress API | ✓ Atlas UI | △ Stdout | ✓ CloudWatch | ✗ Stdout |
| Managed Service | ✗ Self-run | ✗ Self-run | ✓ Atlas | ✗ Self-run | ✓ AWS | ✗ Self-run |
Which source → destination combinations each tool supports.
| Platform | mongodump | mongosync | Live Migrate | mongomirror | AWS DMS | mongoexport |
|---|---|---|---|---|---|---|
| MongoDB EA / Community | ✓ Source & Target | ✓ Source & Target | ✓ Source only | ✓ Source only | ✓ Source & Target | ✓ Source & Target |
| MongoDB Atlas | ✓ Source & Target | ✓ Source & Target | ✓ Dest (required) | ✓ Dest (required) | ✓ Source & Target | ✓ Source & Target |
| Amazon DocumentDB | ✗ Not real MongoDB | ✗ No change streams | ✗ | ✗ | ✓ Via DMS endpoint | △ Partial API compat |
| Cosmos DB (vCore) | △ mongodump works; restore limited | ✗ No change stream compat | △ vCore as source | ✗ | ✗ No DMS endpoint | △ Export works; import limited |
| Cosmos DB (RU) | △ Partial API compat | ✗ Wire protocol gaps | ✗ | ✗ | ✗ | △ Partial |
| Self-managed replica set | ✓ Any (inc. standalone) | ✓ Replica sets & sharded | ✓ Source | ✓ Source (RS only) | ✓ Source (RS for CDC) | ✓ Any (inc. standalone) |
| Version | mongodump | mongosync | Live Migrate | mongomirror | AWS DMS | mongoexport |
|---|---|---|---|---|---|---|
| 4.2 | ✓ | ✗ | ✗ | ✓ | ✓ | ✓ |
| 4.4 | ✓ | ✗ (dropped v1.19) | ✗ | ✓ | ✓ | ✓ |
| 5.0 | ✓ | ✗ | ✓ Source | ✓ | ✓ | ✓ |
| 6.0 | ✓ | ✓ ≥6.0.17 | ✓ | △ Max | ✓ | ✓ |
| 7.0 | ✓ | ✓ ≥7.0.13 | ✓ | ✗ | ✓ | ✓ |
| 8.0 | ✓ | ✓ | ✓ | ✗ EOL | ✓ | ✓ |
Not every migration is a full cluster copy. Here's how each tool handles selective migration.
Filter by db, collection, or query predicate.
Regex since v1.1/v1.6. Immutable after sync starts.
Inherits mongosync filtering. Configured via Atlas UI during setup.
No filtering.
Full cluster only. Key reason it was replaced.
Wildcard table mapping rules + transformations.
One collection at a time. Filter by query. CSV requires --fields.
--query)--query filteringWhat catches people in production.
--oplog, dump is inconsistent during writes. With it, oplog must not roll over before dump completes. Large DBs = high risk.includeNamespaces / excludeNamespaces cannot be changed after sync starts. Must restart entirely.create, rename, drop collection not replicated. Schema changes during migration require a new task.--oplog equivalent. Unlike mongodump, there is no way to capture ongoing writes during export. The dataset is only consistent if writes are paused.Start at the top. Follow the branches.
Not covered in depth here, but worth knowing about if you're evaluating the full landscape.
Azure's equivalent of AWS DMS. Supports MongoDB as a source via the MongoDB API for migrating to Cosmos DB vCore. Less relevant for Mongo-to-Mongo-Atlas, but the go-to path if your destination is Azure.
Open-source CDC via change streams, streamed through Kafka. Not a migration "tool" per se, but some teams build custom migration pipelines with it — especially when they need to transform data in-flight or fan out to multiple destinations.
Purpose-built for migrating from relational databases (Oracle, SQL Server, PostgreSQL, MySQL) to MongoDB. Not for Mongo-to-Mongo migrations. Includes schema analysis, mapping rules, code conversion, and CDC sync.