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
Download and unzip the GEOJobe-Products-MongoDB-Backup-Restore.zip file into a directory on the server.
Once this folder has been unzipped, extract the
mongodb-database-tools-windows-x86_64-100.5.2.zip
file (located inside of the unzippedGEOJobe-Products-MongoDB-Backup-Restore
) to a designated folder. This folder will contain the following mongo commands:mongoimport
andmongoexport
You will need to add the extracted bin directory to your PATH environment variable in order to access the
mongoimport
andmongoexport
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
Open your Windows Control Panel.
In the ‘System and Security’ category, click ‘System’
Example 1a: System Option Highlighted under “System and Security” of Control PanelClick “Advanced System Settings”. The ‘System Properties’ modal will display.
Example 1b: System/About My PC Window Highlighting “Advanced System Settings”Once the modal for ‘System Properties’ appear, click ‘Environment Variables’ button (located in the Advanced tab of System Properties).
In the ‘System Variables’ section, select the ‘Path’ variable and click the ‘Edit’ button. The ‘Edit Environment Variable' modal will display.
In the ‘Edit Environment Variable’ modal, click ‘New’ and add the filepath of the location you placed the unzipped
mongodb-database-tools-windows-x86_64-100.5.2
.Click ‘Ok’ on each of the modals to confirm your changes.
Next, open the command prompt, and do the following:
Navigate to the filepath where the extracted Backup-Restore directory is located,
Run the following command(s) to the respective GEO Jobe product(s) that you currently own:
at-export.bat
,bmo-export.bat
,cmo-export.bat
, and/orscheduler-export.bat
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.
Verify that the collections JSON in the
/atcollections
,/bmocollections
, and/or/cmocollections
directories have JSON files.Install your version of MongoDB.
Run the
at-import.bat
,bmo-import.bat
,cmo-import.bat
and/orscheduler-import.bat
to restore the database collections respectively.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
If MongoDB is not installed:
Copy your collection JSONs from the backup to directories such as
D:\bmocollections
.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.
Install the latest MongoDB Community on the new machine, AND ensure to click the checkbox to download MongoDBCompass.
Open MongoDB Compass once installation is complete.
In MongoDB Compass, connect to the server where your GEO Jobe products are located in.
Enter the server URI containing your GEO Products, such as
mongodb://localhost:<port>/
.Click the ‘Save & Connect’ button, or the ‘Connect’ button (if the connection already exists).
Click on the ‘Create Database’ button (upper right-corner of your connection’s home page) and type into modal:
Database Name: BackupMyOrg
Collection Name: BackupReports
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.
On the left panel, next to the CleanMyOrg database, click the plus icon for the ‘Create a Collection’ modal to appear.
On the ‘Create Collection’ Modal, enter the next collection name (listed below) and confirm by clicking the ‘Create Collection’ button.
Collection Name: Config
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.Repeat Steps 5-7 again for the following Mongo Collections:
Identities >
D:\bmocollections\Identities.json
RestoreReports >
D:\bmocollections\RestoreReports.json
ScheduledBackup >
D:\bmocollections\ScheduledBackup.json
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
If MongoDB is not installed:
Copy your collection JSONs from the backup to directories such as
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.
Install the latest MongoDB Community on the new machine, be sure to click the checkbox to download MongoDBCompass as well.
After installation, open MongoDBCompass.
In MongoDB Compass, connect to the server where your GEO Jobe products are located in.
Enter the server URI containing your GEO Products, such as
mongodb://localhost:<port>/
.Click the ‘Save & Connect’ button, or the ‘Connect’ button (if the connection already exists).
Click on the ‘Create Database’ button (upper right-corner of your connection’s home page) and type into modal:
Database Name: CleanMyOrg
Collection Name: ConfigClick 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.On the Connection pane (left-side panel), next to the CleanMyOrg database, click the plus icon for the ‘Create a Collection’ modal to appear.
On the ‘Create Collection’ Menu, type in:
Collection Name: Identities'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
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.
AddressBook >
D:\cmocollections\AddressBook.json
ScanIssues >
D:\cmocollections\ScanIssues.json
ScanReports >
D:\cmocollections\ScanReports.json
ScheduledScans >
D:\cmocollections\ScheduledScans.json
WhitelistFolder >
D:\cmocollections\WhitelistFolder.json
WhitelistGroup >
D:\cmocollections\WhitelistGroup.json
WhitelistItem >
D:\cmocollections\WhitelistItem.json
WhitelistItemId >
D:\cmocollections\WhitelistItemId.json
WhitelistLayer >
D:\cmocollections\WhitelistLayer.json
WhitelistUser >
D:\cmocollections\WhitelistUser.json
Install the CleanMyOrg application and install the service.
Restoring Admin Tools Database and Applications
If MongoDB is not installed:
Copy your collection JSONs from the backup to directories such as
D:\atcollections
.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.
Install the latest MongoDB Community on the new machine, be sure to click the checkbox to download MongoDBCompass as well.
After installation, open MongoDBCompass.
In MongoDB Compass, connect to the server where your GEO Jobe products are located in.
Enter the server URI containing your GEO Products, such as
mongodb://localhost:<port>/
.Click the ‘Save & Connect’ button, or the ‘Connect’ button (if the connection already exists).
Click on the ‘Create Database’ button (upper right-corner of your connection’s home page) and type into modal:
Database Name: AdminTools2
Collection Name: SavedFilters
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.On the left panel, next to the AdminTools2 database, click the plus icon for the 'Create a Collection’ modal to appear.
On the ‘Create Collection’ Menu, type in…
Collection Name: SavedFavoriteTools
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
Repeat steps 5-7 and use the following Collections for import:
SavedSettings >
D:\atcollections\SavedSettings.json
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.