Before restoring data, here are a few important considerations:
- Restoring a replica set: Restoring a replica set is not as simple as running mongorestore on the primary. There is a very specific procedure that must be followed, which is described in detail in Chapter 13, Deploying a Replica Set. The procedure basically involves bringing the replica set down, restoring data on one server, and then redeploying the replica set.
- Using the oplog: If you performed a backup using the mongodump --oplog option, when restoring you can add the --oplogReplay option. This will ensure that the restore is performed for a precise point in time.
- Maintaining document integrity: The --drop option causes the collection to be dropped entirely prior to the restore operation. Bear in mind that the trade-off for added database integrity is that it takes longer to restore. Also consider adding the --objcheck option, which checks the integrity of objects (that is, documents...