Using the command line to recover a MongoDB database
You can use the bprestore command to recover a backed-up MongoDB instance.
For more information about the bprestore command, refer to the NetBackup Commands Reference Guide.
To recover a MongoDB database
- On the NetBackup master server, log on as an Administrator or root user based on Windows or UNIX system respectively.
- Run the following command on the NetBackup master server by providing appropriate values:
bprestore -R /usr/openv/tmp/rename.txt -C MongoDBnode-port -s starttime -e endtime -D backup_host -S master_server -L path_progress_log -t 44 -p policyname -f /usr/openv/tmp/filelist.txt
Where,
-CSpecifies the MongoDB cluster node and port number that you have backed up.
-DSpecifies the host name or the FQDN of the backup host.
-eSpecifies the end time of the backup window.
-fSpecifies a file (listfile) that contains a list of files to be restored and can be used instead of the file names option (filenames). In listfile, list each file path must be on a separate line.
For MongoDB, the file list must contain <MongoDBnode_hostname>:<port> of all the MongoDB nodes.
-pSpecifies the backup policy.
-RSpecifies the directory path to a rename file.
-sSpecifies the start time of the backup window.
-SSpecifies the host name or FQDN of the master server.
-t 44Specifies BigData as the policy type.
-L progress_logSpecifies the name of whitelisted file path in which to write progress information.