Maintaining GEO Jobe Product Records when Updating MongoDB Versions
Backing up and Restoring using .bat files
Download and unzip the GEOJobe-Products-MongoDB-Backup-Restore.zip file into a directory on the server.
Extract the mongodb-database-tools-windows-x86_64-100.5.2 to a folder. These include the mongoimport and mongoexport commands.
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\binOpen The Control Panel
In the ‘System and Security’ category, click ‘System’
Click ‘Advanced System Settings’. The ‘System Properties’ modal will display.
Click ‘Environment Variables’.
In the ‘System Variables’ section, select ‘Path’ and click ‘Edit’. The ‘Edit Environment Variable' modal will display.
Click ‘New’ and add the filepath for the location you placed the database tools.
Click ‘Ok’ on each of the modals to confirm your changes.
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.
Verify that the collections JSON in the /atcollections, /bmocollections, and/or /cmocollections directories have JSON files.
Install your new MongoDB version.
Run the at-import.bat, bmo-import.bat, cmo-import.bat and/or scheduler-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.
Optional: Manual Restoring BackupMyOrg Database and Application
If MongoDB is not installed:
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.
Install the latest MongoDB Community on the new machine, be sure to click the checkbox to download MongoDBCompass as well.
After installation, open MongoDBCompass.
Click on the Create Database button and type in
Database Name: BackupMyOrg
Collection Name: BackupReportsClick 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.
On the left panel, next to the BackupMyOrg database, click the plus icon to Create a Collection
On the Create Collection Menu, type in
Collection Name: ConfigRepeat Step 5 by clicking on the new collection on the left panel, then clicking Add Data > Import File and select D:\bmocollections\Config.json
Now you will repeat Steps 7 and 8 again for the following 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.
Restoring CleanMyOrg Database and Application
If MongoDB is not installed:
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.
Install the latest MongoDB Community on the new machine, be sure to click the checkbox to download MongoDBCompass as well.
After installation, open MongoDBCompass.
Click on the Create Database button and type in
Database Name: CleanMyOrg
Collection Name: ConfigClick 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.
On the left panel, next to the CleanMyOrg database, click the plus icon to Create a Collection
On the Create Collection Menu, type in
Collection Name: IdentitiesRepeat Step 5 by clicking on the new collection on the left panel, then clicking Add Data > Import File and select D:\cmocollections\Identitites.json
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.
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
If MongoDB is not installed:
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.
Install the latest MongoDB Community on the new machine, be sure to click the checkbox to download MongoDBCompass as well.
After installation, open MongoDBCompass.
Click on the Create Database button and type in
Database Name: AdminTools2
Collection Name: SavedFiltersClick 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
On the left panel, next to the AdminTools2 database, click the plus icon to Create a Collection
On the Create Collection Menu, type in
Collection Name: SavedFavoriteToolsRepeat Step 5 by clicking on the new collection on the left panel, then clicking Add Data > Import File and select D:\atcollections\SavedFavoriteTools.json
Use the following Collections for import:
SavedSettings > D:\atcollections\SavedSettings.json
SavedThumbnailTemplates > D:\atcollections\SavedThumbnailTemplates.json