Backup and Restore Sharded Clusters
The following tutorials describe backup and restoration for sharded clusters:
Tip
mongodump
and mongorestore
cannot be part of a backup strategy for 4.2+ sharded clustersthat have sharded transactions in progress as these tools cannotguarantee a atomicity guarantees of data across the shards.
For 4.2+ sharded clusters with in-progress sharded transactions, forcoordinated backup and restore processes that maintain the atomicityguarantees of transactions across shards, see:
- Back Up a Sharded Cluster with File System Snapshots
- Use file system snapshots back up each component in the shardedcluster individually. The procedure involves stopping the clusterbalancer. If your system configuration allows file system backups,this might be more efficient than using MongoDB tools.
- Back Up a Sharded Cluster with Database Dumps
- Create backups using
mongodump
to back up eachcomponent in the cluster individually. - Schedule Backup Window for Sharded Clusters
- Limit the operation of the cluster balancer to provide a windowfor regular backup operations.
- Restore a Sharded Cluster
- An outline of the procedure and consideration for restoring anentire sharded cluster from backup.