Migrating data


Migrating the MVMA database to the latest version of MongoDB

Starting with MVMA 9.2.00, MongoDB is no longer installed when you install MVMA. You must download, install, and configure MongoDB as a separate step, together with MongoDB tools. We recommend that you use the latest version of MongoDB supported by your version of MVMA9.2 and your platform. 

If you are upgrading from an earlier version of MVMA, you must migrate the MVMA database. Likewise, If you upgrade the version of MongoDB that you are using with MVMA 9.2.00 or later, you might have to migrate the MVMA database depending on the changes within MongoDB from one version to another.

To export MVMA data collections from your current MongoDB database

Use the exportMongoDB utility to export all MVMA data collections stored in your current MongoDB database:

  1. Use the exportMongoDB command utility to export all MVMA data collections stored in the running MongoDB database.  The utility is located in the bin subdirectory of the MVMA 9.2 installation directory <mvma92_installpath>.
    The usage of the utility is: exportMongoDB <mongodb_tools_source_installpath> where <mongodb_tools_source_installpath> refers to the installation directory of the MongoDB tools that are compatible with the MongoDB server for exporting the MVMA database.
    For more information, run the utility with the --help argument.
  2. Performing the MVMA database export:
    1. Before running the MVMA exportMongoDB utilitiy, verify that the following prerequisites are met:


      1. The source MongoDB database server must be installed on the source system.
      2. Install the MongoDB tools in a version compatible with the source MongoDB database for exporting. 
      3. The MVMA MongoDB database is, as by default, available in the <mvma_source_installpath>/data/db folder on the source system where <mvma_source_installpath> specifies the path from which the MVMA installation data is exported. 
      4. MVMA 9.2 is installed on the source system.
    1. To export the MVMA MongoDB database collections from the source MongoDB database:


      1. Make sure to stop MVMA and MongoDB on the source system.
      2. Open a command prompt and navigate to the directory containing the MVMA database directory data/db.
        (For example, <mvma91_installdir>).
      3. Start the source MongoDB database server with the data directory by running <mongodb_source_installpath>/bin/mongod --dbpath ./data/db --logpath data.log. Alternatively, if a MongoDB configuration file is available run mongod with the -f switch set to the configuration file ( for example,<mongodb_source_installpath>/bin/mongod -f etc/data.conf) where <mongodb_source_installpath>  refers to the installation directory of the MongoDB server used to export, typically the version of the MongoDB server used with MVMA before upgrading to a new version.
      4. Open a command prompt and navigate to the MVMA 9.2 installation directory <mvma92_installpath>.
      5. Run the following file to export the MVMA MongoDB collections into subdirectory that was created during the mongodb_export export:
        • (Windows) 
        bin\exportMongoDB.bat <mongodb_tools_source_installpath>
        • (Linux) 
        ./bin/exportMongoDB.sh <mongodb_tools_source_installpath>

To import MVMA data collections from your current MongoDB database

Use the importMongoDB utility to import all MVMA data collections:

  1. Use the importMongoDB command utility to import all MVMA data collections previously exported with exportMongoDB to a local directory named mongodb_export into MVMA's assigned target MongoDB database.  The utility is located in the bin sub-directory of the MVMA 9.2 installation directory referred to as <mvma92_installpath>.
    The usage of the utility is: importMongoDB <mongodb_tools_source_installpath> where <mongodb_tools_source_installpath>
     refers to the installation directory of the MongoDB tools compatible with the MongoDB server used to import the MVMA database.
    For more information run the utility passing it --help as the argument.
  2. Performing the MVMA database import:
    1. To run the MVMA importMongoDB utilitiy you must have


      1. The target MongoDB database server installed on the system.
      2. Install the MongoDB tools in a version compatible with the target MongoDB database for importing.
      3. MVMA 9.2 installed on the source system.
      4. The exported MVMA MongoDB database collections in the export directory mongodb_export.
    1. To import the MVMA MongoDB database collections exported to the directory mongodb_export:
      1. Make sure MVMA and MongoDB are stopped on the system.
      2. Open a command prompt and navigate to the directory that contains the MVMA database directory you have previously exported to (for example, mongodb_export).
      3. Start the target MongoDB database server pointing it to the existing data directory.
        For example, running <mongodb_target_installpath>/bin/mongod --dbpath ./data/db --logpath data.log. Alternatively, if a MongoDB configuration file is available run mongod with the -f switch set to the configuration file (for example, <mongodb_target_installpath>/bin/mongod -f etc/data.conf) where <mongodb_target_installpath> refers 
        to the installation directory of the MongoDB server used to import, typically the version of the MongoDB server used with MVMA before upgrading to a new version.
      4. Open a command prompt and navigate to the MVMA 9.2 installation directory <mvma92_installpath>.
      5. Make sure the export directory mongodb_export exists in <mvma92_installpath>.
      6. Run the following file to import the MVMA MongoDB collections into sub-directory that is created during the mongodb_export export:
        • (Windows) 
        bin\importMongoDB.bat <mongodb_tools_target_installpath>
        • (Linux) 
        ./bin/importMongoDB.sh <mongodb_tools_target_installpath>

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*