The overall procedure to get a replica set up and running is as follows:
- Set up and test the network connectivity between the members of the replica set.
- Configure the replication settings in the mongod.conf file for each member.
- Start the mongod instances on each server in the replica set one by one.
- Initiate the replica set via the mongo shell.
- Confirm the replica set status.
- Restore or upload database documents as needed.
- Troubleshoot, reconfigure, and restart as needed.
For more information on testing connections, refer to https://docs.mongodb.com/manual/tutorial/troubleshoot-replica-sets/#test-connections-between-all-members.
Let's start by confirming network connectivity between replica set members.