Recovering the MongoDB Database Using the Mongo Recovery Assistant Tool for Linux

You can recover your MongoDB persistant data from a disaster recovery (DR) backup to a Linux Web Server host using the MongoDB Recovery Assistant tool for Linux.

The tool is primarily used in the following scenarios:

  • To rebuild a MongoDB database in the event of a disaster

  • To upgrade or move the MongoDB database to a new hardware

Before You Begin

  • Make sure that you have the latest version of the DR backup (SET_XXX folder) in the destination Web Server host (where MongoDB package is installed).

    • If you have the DR backup files in the network location, copy the files to the local disk on the Web Server host.

    • If the latest copy of the DR backup metadata does not exist in the export location, you must retrieve the metadata from the backup media. For more information on retrieving DR backups from media, See Retrieving Disaster Recovery (DR) Backups from Media.

Procedure

  1. Stop services on all the Web Server hosts, if it is active. For more information on stopping services, see Stopping a Service for Windows, and Commands to Control Services on UNIX Clients for UNIX.

  2. To run the MongoDB Recovery Assistant tool, on the destination Linux Web Server (where MongoDB package is present), go to {software installation path}\MongoDB\Util\CVMongoRecoveryAssistant and execute the following command:

    ./CVMongoRecoveryAssistant.sh

    and enter the dump location path.

    Alternatively,

    ./CVMongoRecoveryAssistant.sh [-dumplocation <db dump location>] [-instance <Commvault product instance>]

    Example:

    ./CVMongoRecoveryAssistant.sh -dumplocation /restores -Instance Instance001

    After providing the dump location path, you'll see a summary of the databases that are getting restored. Type Continue and then the restore operation will start.

  3. To resume the previous restore operation, run the following command:

    ./CVMongoRecoveryAssistant.sh -resumepreviousrestore true

    and you will see a summary of the databases that are getting restored. Type Continue or Quit to continue or quit the restore operation.

What To Do Next

Restart all the Commvault services on all the Web Server hosts that were previously stopped.

Loading...