There are several considerations when performing a backup on a sharded cluster. First of all, and most importantly, backing up a sharded cluster using mongodump and restoring using mongorestore cannot be used. The reason for this is because it is impossible for backups created using mongodump to guarantee database integrity if sharded transactions are in progress. Accordingly, the only realistic backup solution for a sharded collection is to use filesystem snapshots.
Another extremely important consideration is to disable the balancer before the filesystem snapshot backup is taken. Once the backup is complete, you can then re-enable the balancer. For more information on disabling and re-enabling the balancer, see the Disabling the balancer and Enabling the balancer sub-sections earlier in this chapter.Â
It is possible to schedule the balancer to run only at certain...