NetBackup™ for MongoDB Administrator's Guide
- Overview of protecting MongoDB using NetBackup
- Verify the pre-requisites for the MongoDB plug-in for NetBackup
- Configuring NetBackup for MongoDB
- Configuring backup options for MongoDB using the mongodb.conf file
- Adding MongoDB credentials in NetBackup
- Managing backup hosts
- Backing up MongoDB using NetBackup
- Restoring or recovering MongoDB data using NetBackup
- Troubleshooting
- Appendix A. Additional information
Using NetBackup web UI to restore the MongoDB data on an alternate cluster
NetBackup supports the following alternate recovery scenarios for MongoDB:
Redirected restore and recovery to an alternate cluster
Redirected restore and recovery to an alternate node or port or database path in an existing cluster
Complete the following steps to run alternate recovery for MongoDB:
Run the tpconfig command to update the original cluster's credentials with the alternate application server's credentials.
For example, to recover source client Host1-26050 to an alternate application server Host2 that is running on port 28001:
Add the credentials of Host2:28001 and its related nodes in the original cluster's credential configuration file. For more information, See About the credential configuration file.
Run the update tpconfig command for application_server that is getting recovered (Host1-26050)
Here is a sample command:
/usr/openv/volmgr/bin/tpconfig -update -application_server Host1-26050 -application_type mongodb -requiredport 26050 -application_server_conf /usr/openv/var/global/credential.conf
Rename the application server and its nodes and set the value for the alternate application server.
On the NetBackup web UI:
On the left, select
.On the Recoverpage, Regular recovery wind, click Start recovery.
On the Basic properties tab, enter the following:
Select the
asSpecify the MongoDB application server as the source for which you want to perform the restore operation.
From the
list, select the required Application server.Specify the backup host as the destination client.
From the
list, select the required backup host. Restore is faster if the backup host is the media server that had backed up the node.Click
.
On the Recovery details tab, do the following:
Select the appropriate date range to restore the complete data set or go to
and select the backup images that you want to restore.From left directory hierarchy, select the files and folders for restore.
Note:
All the subsequent files and folders under the directory are displayed in the right pane.
Click
.
On the Recovery options tab, do the following:
Select
to restore your files to the same location where you performed your backup.In MongoDB options, select and recover databases for current time or select the specific schedule.
Click
.
Review and click
.To change the folder path, select
and add the new destination path.
Click Start Restore to start the recovery operation. You can check the status from the Activity Monitor.
You can restore the MongoDB oplog files from an incremental backup to an alternate path. The files and their path are seen in the web UI.
You must specify the paths during the alternate restore using the
option.If you want to retain the original MongoDB path but change the oplog file path, in the dialog box, specific the source and alternate paths.
For example, Source /host:port/tmp and Destination /host:port/alternate_tmp.
For an alternate restore from a nested database path, use the Add Destination dialog box and for every subfolder, add an appropriate target alternate path.
For example, to change the path from /host:port/usr/mongodb/db1 to /host:port/alt-dir/dbpath/mydb:
Specify the source and the destination path:
Source /host:port/usr/mongodb/db1 and Destination /host:port/alt-dir/dbpath/mydb
Specify the source and the destination path for the parent folder:
Source /host:port/usr/mongodb and Destination /host:port/alt-dir/dbpath
Specify the source and the destination path for the base parent folder:
Source /host:port/usr and Destination /host:port/alt-dir
Note:
When you do an alternate restore to a non-root path, the restore is partially successful if the database path contains multiple subfolders.
In such a scenario, when you do an alternate restore to a different location, you must add an entry for each directory level.
For example:
Source:/hostname1:port1/Config_Data
Destination: /hostname2:port3/mongo_inst2
Source:/hostname1:port1/Config_Data/data
Destination:/hostname2:port3/mongo_inst2/data
Source:/hostname2:port2/Shard1_Primary
Destination:/hostname2:port3/mongo_inst2
Source:/hostname2:port2/Shard1_Primary/data
Destination:/hostname2:port3/mongo_inst2/data
You can restore a MongoDB cluster (sharded or replica set) that was backed up from different nodes because of the role switch (between primary and secondary nodes) within a shard or replica set. In such a scenario, the full backup can be taken from one host and incremental backup is taken from another host in the same shard or replica set.
During restore, you must redirect the restore of these backup images to the same MongoDB host.
For example, to restore backups from /host1:port1/dbpath and /host2:port1/tmp, specify the following:
Source /host1:port1/dbpath and Destination /althost:port1/dbpath
Source /host2:port1/tmp and Destination /althost:port1/tmp