I have MongoDB setup like this:
Primary | Server1
-----------+---------
Secondary | Server2
-----------+---------
Arbiter | Server3
-----------+---------
Backup | Server4
I have a backup server for daily backup using **mongodump**. Now I have to test my backup dump using **mongorestore**.
The main question is the following: What is the best way to restore the backup?
Q1: I have to follow these steps?
1. Stop arbiter & secondary
2. Drop database in primary
3. Restore backup to primary
4. Drop database on secondary
5. Restart all the server
Q2: Restore the backup on primary without stopping any of the servers?
Q3. Make secondary as primary and restore the backup to secondary ( previous primary), and make it primary.
Q4: Is there is any way to restore both the server?
Please suggest the best approach to restore MongoDB.
Asked by SGRao
(41 rep)
Mar 1, 2018, 05:23 AM
Last activity: Jul 28, 2025, 03:10 AM
Last activity: Jul 28, 2025, 03:10 AM