Restore a Single Shard¶
Restoring a single shard from backup with other unaffected shards requires a number of special considerations and practices. This document outlines the additional tasks you must perform when restoring a single shard.
Consider the following resources on backups in general as well as backup and restoration of sharded clusters specifically:
Always restore sharded clusters as a whole. When you restore a single shard, keep in mind that the balancer process might have moved chunks to or from this shard since the last backup. If that’s the case, you must manually move those chunks, as described in this procedure.
Manage the chunks.¶
For all chunks that migrate away from this shard, you do not need to do
anything at this time. You do not need to delete these documents from
the shard because the chunks are automatically filtered out from queries
mongos. You can remove these documents from the shard, if
you like, at your leisure.
For chunks that migrate to this shard after the most recent backup, you
must manually recover the chunks using backups of other shards, or some
other source. To determine what chunks have moved, view the
changelog collection in the Config Database.