In this procedure, you will stop the cluster balancer and take a backup
up of the config database, and then take backups of each
shard in the cluster using a file-system snapshot tool. If you need an
exact moment-in-time snapshot of the system, you will need to stop all
application writes before taking the file system snapshots; otherwise
the snapshot will only approximate a moment in time.

For approximate point-in-time snapshots, you can minimize the impact on
the cluster by taking the backup from a secondary member of each
replica set shard.

If the journal and data files are on the same logical volume, you can
use a single point-in-time snapshot to capture a consistent copy of the
data files.

If the journal and data files are on different file systems, you must
use db.fsyncLock() and db.fsyncUnlock() to ensure
that the data files do not change, providing consistency for the
purposes of creating backups.

If your deployment depends on Amazon’s Elastic Block Storage (EBS) with
RAID configured within your instance, it is impossible to get a
consistent state across all disks using the platform’s snapshot tool. As
an alternative, you can do one of the following:

Flush all writes to disk and create a write lock to ensure
consistent state during the backup process.

If locking a secondary of the CSRS, confirm that the member has
replicated data up to some control point. To verify, first connect a
mongo shell to the CSRS primary and perform a write
operation with "majority" write concern on a
control collection:

If the secondary member contains the latest control document, it
is safe to lock the member. Otherwise, wait until the member
contains the document or select a different secondary member
that contains the latest control document.

Backing up a config server backs
up the sharded cluster’s metadata. You only need to back up one
config server, as they all hold the same data. Perform this step
against the locked CSRS secondary member.

To create a file-system snapshot of the config server, follow the
procedure in Create a Snapshot.