Info |
---|
SummaryThis 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.
Extract 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. These include the This folder will contain the following mongo commands:mongoimport
andmongoexport
commands.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:
Example path:Code Block C:\Users\YourUser\Downloads\GEOJobe-Products-MongoDB-Backup-Restore\mongodb-database-tools-windows-x86_64-100.5.2\bin
Open The your Windows Control Panel.
In the ‘System and Security’ category, click ‘System’
Click ‘Advanced “Advanced System Settings’Settings”. The ‘System Properties’ modal will display.Click ‘Environment Variables’
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.Click
In the ‘Edit Environment Variable’ modal, click ‘New’ and add the filepath for 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.
In Next, open the command prompt, navigate 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 new version of MongoDB version.
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
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 AND ensure to click the checkbox to download MongoDBCompass as well.After installation, open 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 and type in‘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; then the Import File button. Select ‘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:\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.
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 Configcollection in the left panel. Then, click the Add Data ‘Add Data’ button; then the 'Import File 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 to Create a Collection
➕ for the ‘Create a Collection’ modal to appear.
On the Create Collection ‘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 '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 and 8 again for the following all of the follow Collections following collections you have. Note: If you do not have a Collectioncollection, 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 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:\
bmocollections and D:\cmocollections.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 ‘Add Data’ button; then the Import File ‘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 to ➕ for the 'Create a Collection
Collection’ modal to appear.
On the Create Collection ‘Create Collection’ Menu, type inin…
Collection Name: SavedFavoriteTools
Repeat Step 5 by clicking on the new collection on Click the newly created collection in the left panel, then clicking Add Data > Import File click ‘Add Data’ > ‘Import JSON or CSV file’ button and select
D:\atcollections\SavedFavoriteTools.json
Use 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.