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. Options to backing and restoring your GEO Jobe database records include backing/restoring via .bat file OR manually submitting the JSON records to MongoDB Compass. (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 Zip: Download and unzip the GEOJobe-Products-MongoDB-Backup-Restore.zip file into a directory on the server.
Create Bin Directory: 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 to properly backup and restore your records:mongoimport
andmongoexport
Setting Up Bin Path in System Environment: You will need to add the extracted
bin
directory to your PATH environment variable in order to access themongoimport
andmongoexport
files: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” to navigate to the ‘System Properties’ modal.
Example 1b: System/About My PC Window Highlighting “Advanced System Settings”Once the modal for ‘System Properties’ appears, click ‘Environment Variables’ button (located in the Advanced tab of System Properties).
Under ‘System Variables’ section, select the
Path
variable and click the ‘Edit…’ button. The ‘Edit Environment Variable' modal will appear.In the ‘Edit Environment Variable’ modal, click the ‘New’ button. Add the filepath where the
bin
directory is designated to. An example path is shown below:C:\Users\YourUser\GEOJobe-Products\GEOJobe-Products-MongoDB-Backup-Restore\mongodb-database-tools-windows-x86_64-100.5.2\bin
Confirm new filepath by clicking ‘OK’ on each of the Environment Variable modals.
Backing Up Database Records: Open the command prompt, and do the following:
Navigate to the directory where the extracted Backup-Restore directory is located,
In CMD, enter one or more of the following command(s) respective to the GEO Jobe product(s) that you currently own:
at-export.bat
,bmo-export.bat
,cmo-export.bat
, and/orscheduler-export.bat
Note: After accessing one or more of the .bat file(s), this will automatically create a
/[GEO Jobe product here]collections
folder in your directory. 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. This concludes the backup portion of saving your database records.
Install MongoDB: Proceed to install your version of MongoDB.
Restore Database Records: Run the
at-import.bat
,bmo-import.bat
,cmo-import.bat
and/orscheduler-import.bat
to restore the database collections respectively.Install GEO Jobe Product(s): Install the Admin Tools, BackupMyOrg, CleanMyOrg and/or Scheduler applications to their previous file locations (if needed).
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.