| Method | Tool | Consistency | Speed | Pros | Cons |
|---|---|---|---|---|---|
| Logical | mongodump | Per-collection (point-in-time with --oplog) | Slow (reads data) | Portable BSON; selective restore; no version lock | Slow on large datasets; locks not held across collections |
| Filesystem snapshot | LVM/EBS snapshot | Consistent if journal on same volume | Fast (block-level) | Instant; works at TB scale; exact copy | Platform-specific; entire volume only; requires journal on same volume |
| Cloud managed | Atlas Backup | Fully consistent; point-in-time | Continuous (automatic) | No operational overhead; PITR; snapshot scheduling | Atlas only; costs extra |
Never copy raw data files while mongod is running without first locking or using a consistent snapshot mechanism. WiredTiger data files may be in a partially-written state. Always use
mongodump, a proper filesystem snapshot with journal on same volume, or MongoDB Cloud Backup for any backup you intend to restore from.Required Roles for Backup Operations
// Minimum roles for mongodump user: db.grantRolesToUser("backupUser", [ { role: "backup", db: "admin" }, // read all data + list collections ]) // Minimum roles for mongorestore user: db.grantRolesToUser("restoreUser", [ { role: "restore", db: "admin" }, // write all data + create collections ])