Maintaining GEO Jobe Product Records when Updating MongoDB Versions

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. Extract the mongodb-database-tools-windows-x86_64-100.5.2 to a folder. These include the mongoimport and mongoexport commands.

  3. You will need to add the extracted bin directory to your PATH environment variable in order to access the mongoimport and mongoexport files:
    Example path: C:\Users\YourUser\Downloads\GEOJobe-Products-MongoDB-Backup-Restore\mongodb-database-tools-windows-x86_64-100.5.2\bin

    1. Open The Control Panel

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

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

    4. Click ‘Environment Variables’.

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

    6. Click ‘New’ and add the filepath for the location you placed the database tools.

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

  4. In the command prompt, navigate to the extracted Backup-Restore directory and run at-export.bat, bmo-export.bat, cmo-export.bat and/or scheduler-export.bat for each product you own. 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 new MongoDB version.

  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.

Optional: Manual 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 and D:\cmocollections. 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. Click on the Create Database button and type in
    Database Name: BackupMyOrg
    Collection Name: BackupReports

  3. Click on the BackupReports collection. Then, click the Add Data button; then the Import File button. Select the D:\bmocollections\BackupReports.json file. The input file type should be JSON.

  4. On the left panel, next to the BackupMyOrg database, click the plus icon to Create a Collection

  5. On the Create Collection Menu, type in
    Collection Name: Config

  6. Repeat Step 5 by clicking on the new collection on the left panel, then clicking Add Data > Import File and select D:\bmocollections\Config.json

  7. Now you will repeat Steps 7 and 8 again for the following Collections:

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

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

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

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

Restoring CleanMyOrg Database and Application

 

  1. If MongoDB is not installed:

    1. Copy your collection JSONs from the backup to directories such as D:\bmocollections and D:\cmocollections. 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. Click on the Create Database button and type in

    Database Name: CleanMyOrg
    Collection Name: Config

  3. Click on the Config collection in the left panel. Then, click the Add Data button; then the Import File button. Select the D:\cmocollections\Config.json file. The input file type should be JSON.

  4. On the left panel, next to the CleanMyOrg database, click the plus icon to Create a Collection

  5. On the Create Collection Menu, type in
    Collection Name: Identities

  6. Repeat Step 5 by clicking on the new collection on the left panel, then clicking Add Data > Import File and select D:\cmocollections\Identitites.json

  7. Now, repeat Steps 7 and 8 again for the following all the follow 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, CMO 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

  8. Install the CleanMyOrg application and install the service.

Restoring Admin Tools Database

  1. If MongoDB is not installed:

    1. Copy your collection JSONs from the backup to directories such as D:\bmocollections and D:\cmocollections. 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. Click on the Create Database button and type in

    Database Name: AdminTools2
    Collection Name: SavedFilters

  3. Click on the SavedFilters collection in the left panel. Then, click the Add Data button; then the Import File button. Select the D:\atcollections\SavedFilters.json file. The input file type should be JSON

  4. On the left panel, next to the AdminTools2 database, click the plus icon to Create a Collection

  5. On the Create Collection Menu, type in
    Collection Name: SavedFavoriteTools

  6. Repeat Step 5 by clicking on the new collection on the left panel, then clicking Add Data > Import File and select D:\atcollections\SavedFavoriteTools.json

  7. Use the following Collections for import:

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

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

Related pages