This document discusses backup and disaster recovery strategies for MongoDB databases. It provides an overview of different backup options for MongoDB including mongodump and file system snapshots. It also discusses using replica sets for disaster avoidance by maintaining redundant copies of data across multiple data centers. For sharded clusters, it recommends stopping the balancer, backing up shards and config servers, and resuming the balancer for point-in-time backups. The key messages are that backing up MongoDB is not difficult, there are multiple options to choose from, and practicing backups is important for disaster recovery.
8. mongodump
• Dumps collections to *.bson files
– Use bsondump to view these files
• Mirrors your structure
• Can be run in live or offline mode
• --dbpath for direct file access
• --oplog to dump oplog last PIT
• --query/filter selective dump
19. Sharded Systems
• No true point in time
1. Stop balancing – sh.stopBalancer()
2. Stop one config server (data R/O)
3. Backup Data (shards, config)
4. Restart config server
5. Resume Balancer