Maintaining GEO Jobe Product Records when Updating MongoDB Versions

 

Summary

This article is a step-through guide for backing up and restoring your existing records in MongoDB before updating to the latest version. (Note: Visual examples can be enlarged for better viewing by clicking the images. The MongoDB Compass visual examples shown in this article will be based on the interface of version 1.45.0)

Backing up and Restoring using .bat files

  1. Download and unzip the GEOJobe-Products-MongoDB-Backup-Restore.zip file into a directory on the server.

  2. Once this folder has been unzipped, extract the mongodb-database-tools-windows-x86_64-100.5.2.zip file (located inside of the unzipped GEOJobe-Products-MongoDB-Backup-Restore) to a designated folder. This folder will contain the following mongo commands: mongoimport and mongoexport

  3. You will need to add the extracted bin directory to your PATH environment variable in order to access the mongoimport and mongoexport files. An example path AND instructions for setting the environment variable are shown below:

    C:\Users\YourUser\Downloads\GEOJobe-Products-MongoDB-Backup-Restore\mongodb-database-tools-windows-x86_64-100.5.2\bin
    1. Open your Windows Control Panel.

    2. In the ‘System and Security’ category, click ‘System’

       

      test.png
      Example 1a: System Option Highlighted under “System and Security” of Control Panel

       

    3. Click “Advanced System Settings”. The ‘System Properties’ modal will display.

      image-20250107-155910.png
      Example 1b: System/About My PC Window Highlighting “Advanced System Settings”

       

    4. Once the modal for ‘System Properties’ appear, click ‘Environment Variables’ button (located in the Advanced tab of System Properties).

    5. In the ‘System Variables’ section, select the ‘Path’ variable and click the ‘Edit’ button. The ‘Edit Environment Variable' modal will display.

    6. In the ‘Edit Environment Variable’ modal, click ‘New’ and add the filepath of the location you placed the unzippedmongodb-database-tools-windows-x86_64-100.5.2.

    7. Click ‘Ok’ on each of the modals to confirm your changes.

  4. Next, open the command prompt, and do the following:

    1. Navigate to the filepath where the extracted Backup-Restore directory is located,

    2. Run the following command(s) to the respective GEO Jobe product(s) that you currently own:

      1. at-export.bat,

      2. bmo-export.bat,

      3. cmo-export.bat, and/or

      4. scheduler-export.bat

      5. Note: If you have previously created your JSON collection files from another server, copy them into the /bmocollections and /cmocollections directories respectively instead of running the export file.

  5. Verify that the collections JSON in the /atcollections, /bmocollections, and/or /cmocollections directories have JSON files.

  6. Install your version of MongoDB.

  7. Run the at-import.bat, bmo-import.bat, cmo-import.bat and/or scheduler-import.bat to restore the database collections respectively.

  8. Install the Admin Tools, BackupMyOrg, CleanMyOrg and/or Scheduler applications to their previous file locations (if needed).

This should be all you need to migrate your data. If you wish to migrate the data manually, see the steps below.

 


Manually Restoring BackupMyOrg Database and Application

  1. If MongoDB is not installed:

    1. Copy your collection JSONs from the backup to directories such as D:\bmocollections.

      1. Note: Copy all collections, even if it’s not the one you are restoring. Updating MongoDB will clear all of your collections in the update process.

    2. Install the latest MongoDB Community on the new machine, AND ensure to click the checkbox to download MongoDBCompass.

    3. Open MongoDB Compass once installation is complete.

  2. In MongoDB Compass, connect to the server where your GEO Jobe products are located in.

    1. Enter the server URI containing your GEO Products, such as mongodb://localhost:<port>/ .

    2. Click the ‘Save & Connect’ button, or the ‘Connect’ button (if the connection already exists).

       

  3. Click on the ‘Create Database’ button (upper right-corner of your connection’s home page) and type into modal:

    1. Database Name: BackupMyOrg

    2. Collection Name: BackupReports

       

  4. First, locate and select the newly created BackupMyOrg database (found in the left panel inside or Connections panel). In the expanded BackupMyOrg database, locate and select the BackupReports collection. Then, click the ‘Add Data’ button and click ‘Import JSON or CSV file’ button. A pop-up modal will appear where you will locate and select the D:\bmocollections\BackupReports.json file. The input file type should be JSON.

 

  1. On the left panel, next to the CleanMyOrg database, click the plus icon for the ‘Create a Collection’ modal to appear.

     

  2. On the ‘Create Collection’ Modal, enter the next collection name (listed below) and confirm by clicking the ‘Create Collection’ button.

    1. Collection Name: Config

 

  1. Navigate to the newly created collection found in the the left panel. Click ‘Add Data’ > 'Import JSON or CSV' buttons and select D:\bmocollections\Config.json as your file.

  2. Repeat Steps 5-7 again for the following Mongo Collections:

    1. Identities > D:\bmocollections\Identities.json

    2. RestoreReports > D:\bmocollections\RestoreReports.json

    3. ScheduledBackup > D:\bmocollections\ScheduledBackup.json

  3. Install the BackupMyOrg application and all of the existing Identitites’ backup locations to the same directory structure as the previous server, and install the service.


Manually Restoring CleanMyOrg Database and Application

  1. If MongoDB is not installed:

    1. Copy your collection JSONs from the backup to directories such as D:\cmocollections.

      1. Note: Copy all collections, even if it’s not the one you are restoring. Updating MongoDB will clear all of your collections in the update process.

    2. Install the latest MongoDB Community on the new machine, be sure to click the checkbox to download MongoDBCompass as well.

    3. After installation, open MongoDBCompass.

  2. In MongoDB Compass, connect to the server where your GEO Jobe products are located in.

    1. Enter the server URI containing your GEO Products, such as mongodb://localhost:<port>/ .

    2. Click the ‘Save & Connect’ button, or the ‘Connect’ button (if the connection already exists).

       

  3. Click on the ‘Create Database’ button (upper right-corner of your connection’s home page) and type into modal:

    Database Name: CleanMyOrg
    Collection Name: Config

     

  4. Click on the Config collection in the left panel. Then, click the ‘Add Data’ button; then the 'Import JSON or CSV' button. Select the D:\cmocollections\Config.json file. The input file type should be JSON.

     

  5. On the Connection pane (left-side panel), next to the CleanMyOrg database, click the plus icon for the ‘Create a Collection’ modal to appear.

     

  6. On the ‘Create Collection’ Menu, type in:
    Collection Name: Identities'

  7. Navigate to the newly created collection found in the the left panel. Click ‘Add Data’ > 'Import JSON or CSV' buttons and select D:\cmocollections\Identitites.json

  8. Now, repeat Steps 5-7 again for the following all of the following collections you have. Note: If you do not have a collection, that is okay. It means you are not currently utilizing that collection and there is therefore nothing to restore. If you decide to use it in the future, CleanMyOrg will generate the collection for you.

    1. AddressBook > D:\cmocollections\AddressBook.json

    2. ScanIssues > D:\cmocollections\ScanIssues.json

    3. ScanReports > D:\cmocollections\ScanReports.json

    4. ScheduledScans > D:\cmocollections\ScheduledScans.json

    5. WhitelistFolder > D:\cmocollections\WhitelistFolder.json

    6. WhitelistGroup > D:\cmocollections\WhitelistGroup.json

    7. WhitelistItem > D:\cmocollections\WhitelistItem.json

    8. WhitelistItemId > D:\cmocollections\WhitelistItemId.json

    9. WhitelistLayer > D:\cmocollections\WhitelistLayer.json

    10. WhitelistUser > D:\cmocollections\WhitelistUser.json

  9. Install the CleanMyOrg application and install the service.


Restoring Admin Tools Database and Applications

  1. If MongoDB is not installed:

    1. Copy your collection JSONs from the backup to directories such as D:\atcollections.

      1. Note: Copy all collections, even if it’s not the one you are restoring. Updating MongoDB will clear all of your collections in the update process.

    2. Install the latest MongoDB Community on the new machine, be sure to click the checkbox to download MongoDBCompass as well.

    3. After installation, open MongoDBCompass.

  2. In MongoDB Compass, connect to the server where your GEO Jobe products are located in.

    1. Enter the server URI containing your GEO Products, such as mongodb://localhost:<port>/ .

    2. Click the ‘Save & Connect’ button, or the ‘Connect’ button (if the connection already exists).

       

  3. Click on the ‘Create Database’ button (upper right-corner of your connection’s home page) and type into modal:

    1. Database Name: AdminTools2
      Collection Name: SavedFilters

       

  4. Click on the SavedFilters collection in the left panel. Then, click the ‘Add Data’ button; then the ‘Import JSON or CSV file’ button. Select the D:\atcollections\SavedFilters.json file. The input file type should be in JSON format.

     

  5. On the left panel, next to the AdminTools2 database, click the plus icon for the 'Create a Collection’ modal to appear.

     

  6. On the ‘Create Collection’ Menu, type in…

    1. Collection Name: SavedFavoriteTools

  7. Click the newly created collection in the left panel, then click ‘Add Data’ > ‘Import JSON or CSV file’ button and select D:\atcollections\SavedFavoriteTools.json

  8. Repeat steps 5-7 and use the following Collections for import:

    1. SavedSettings > D:\atcollections\SavedSettings.json

    2. SavedThumbnailTemplates > D:\atcollections\SavedThumbnailTemplates.json

 

If you have any questions or are experiencing any issues while following the step-through, please reach out to our GEO Jobe Support Team at support@geo-jobe.com.

Related pages