NetBackup™ for MongoDB Administrator's Guide

Last Published:
Product(s): NetBackup & Alta Data Protection (10.4)
  1. Overview of protecting MongoDB using NetBackup
    1.  
      About protecting a sharded, replica set, or standalone MongoDB cluster using NetBackup
    2.  
      Protecting MongoDB data using NetBackup
    3.  
      NetBackup for MongoDB terminologies
    4.  
      Limitations
    5.  
      Prerequisites and the best practices for protecting MongoDB
  2. Verify the pre-requisites for the MongoDB plug-in for NetBackup
    1.  
      Operating system and platform compatibility
    2.  
      Prerequisites for configuring the MongoDB plug-in
  3. Configuring NetBackup for MongoDB
    1.  
      About the MongoDB configuration tool
    2.  
      Prerequisites for manually creating the mongodb.conf file
    3. Configuring backup options for MongoDB using the mongodb.conf file
      1.  
        Including the configuration file path in the allowed list on the NetBackup primary server
    4.  
      Obtaining the RSA key of the MongoDB nodes
    5. Adding MongoDB credentials in NetBackup
      1.  
        About the credential configuration file
      2.  
        How to add the MongoDB credentials in NetBackup
      3.  
        About the MongoDB roles for protecting the data
    6.  
      Host user requirements
    7. Managing backup hosts
      1.  
        Including a NetBackup client on NetBackup primary server allowed list
  4. Backing up MongoDB using NetBackup
    1. About backing up MongoDB data
      1.  
        Backing up a MongoDB cluster
    2.  
      Prerequisites for backing up a MongoDB cluster
    3. Configuring NetBackup policies for MongoDB plug-in
      1.  
        Creating a BigData backup policy for MongoDB clusters with web UI
  5. Restoring or recovering MongoDB data using NetBackup
    1.  
      About restoring MongoDB data
    2.  
      Prerequisites for MongoDB restore and recovery
    3.  
      Restore the MongoDB data on the same cluster
    4.  
      Restore the MongoDB data on an alternate cluster
    5.  
      Restoring MongoDB data in a high availability setup to an alternate client
    6.  
      Manual steps after the recovery process
  6. Troubleshooting
    1.  
      About NetBackup for MongoDB debug logging
    2.  
      Known limitations for MongoDB protection using NetBackup
  7. Appendix A. Additional information
    1.  
      Sample MongodB configuration utility workflow to add and update MongodB credentials

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

To restore the MongoDB data on an alternate cluster

  1. 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.

      See About the credential configuration file.

    • Run the update tpconfig command for application_server that you want to recover (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

  2. Open the NetBackup web UI.
  3. On the left, click Recovery.
  4. On the Regular recovery card, click Start recovery.
  5. In Basic properties, enter the following:
    • Select the Policy type as BigData > MongoDB

    • From the Source client list, select the required Application server.

    • From the Destination client list, select the required backup host. Restore is faster if the backup host is the media server that had backed up the node.

    • Click Next.

  6. In Recovery details, do the following:
    • If necessary, click Edit to select the appropriate date range to restore the complete data set. Or select Use backup history and select the backup images that you want to restore.

    • Select the files and folders for restore.

    • Click Next.

  7. In Recovery options, do the following:
    • Rename the application server and its nodes and set the value for the alternate application server.

      Select Restore individual directories and files to different locations. To change the folder paths, click Edit file paths.

      See Alternate restore from a nested database path.

    • In the MongoDB options, select Restore and recover and recover databases for current time or select the specific schedule.

    • Click Next.

  8. Review and click Start recovery.

    You can check the status in the Activity monitor.

Restoring the MongoDB oplog file to an alternate temporary location

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 Restore individual directories and files to different locations option.

If you want to retain the original MongoDB path but change the oplog file path, click Edit file paths and specify the source and alternate paths.

For example, Source /host:port/tmp and Destination /host:port/alternate_tmp.

Alternate restore from a nested database path

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

Restoring a MongoDB cluster where the backups are taken from different MongoDB nodes in the same replica set

You can restore a MongoDB cluster (sharded or replica set) that was backed up from different nodes. This capability exists because of the role switch (between primary and secondary nodes) within a shard or a replica set. In this scenario, the full backup can be taken from one host and the 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