Before we get into the details on how to restore a replica set, it must be made clear that if any members of a replica set survive some future disaster, you need to perform synchronization instead of restoration. The reason for this is that the data found on a functioning member of the replica set should be more up to date than the data in a backup. The next subsection deals with resynchronization.
You cannot restore a replica set by simply copying the backup files to the data directories of each member server and then starting the mongod instances. It's not that simple! The procedure outlined in this chapter is based upon the recommended procedure described in the Restore a Replica Set from MongoDB Backups documentation page mentioned earlier.
Assuming that no member of the replica set still remains functional, we'll now examine what is involved in restoring the replica set. Let's have a look at the process step by...