An IP address can be used in place of the hostname.
2. Enter the required credentials on the home page.
3. Click the “Admin” link at the top of the screen.
4. Click the “Backup” tab on the left side of the screen and you’ll be directed to the “Backup” screen.
5. Select either “Sharded Cluster Status” or “Replica Set Status”. For this example, we’ll be restoring a replica set.
6. Click the name of the sharded cluster to restore.
7. Click the “RESTORE” button that corresponds to the desired snapshot (Figure 1).
Figure 1: Screen for restoring MongoDB from a backup
The “Select Restore Destination” screen will appear (Figure 2).
8. Choose the “PUSH VIA SECURE COPY” option at the top and populate the required fields.
In this example, a tar file containing the backup files will be pushed out the MongoDB primary replica server, which has an IP address of 192.168.13.201, using scp. The copy will be performed using the target server’s root user credentials, and the destination folder is “/mongodb/data”. Click on the green “FINALIZE REQUEST” button at the bottom to start the process.
Figure 2: Select Restore Destination
9. Log in to the destination server, locate the tar file and unbundle it using Linux command
10. Use the Linux “cd” command to move into the new directory, and verify that the owner and group are “mongod”.
If not, use the “chown -R” command to change them
11. As the root user, execute the following command to start a new MongoDB instance running under a port that is different from the original production instance: