Backup and Restore MongoDB for Windows for Access Expert On-Premise

Backup and Restore MongoDB for Windows for Access Expert On-Premise


Access Expert On-Premise setup needs procedures and tools to backup and restore the database

Product Line

Access Expert


  • Access Expert Premise Software V3
  • MongoDB


The procedures for backing up and restoring the MongoDB is documented online at the link below.


However, these instructions do not outline how to use the commands (mongodump and mongorestore) within the Windows OS environment using specific examples.


The following procedures are designed to fill in the gap for Access Expert administrators who need to do manual MongoDB Backup and Restore.

These procedures assume that Access Expert V3 has been installed and is functioning normally.

You will need 2 separate Command Prompts, run as Administrator, open for these procedures.

  1. Mongo DOS Shell to attach to and run commands within MongoDB environment
  2. Standard DOS Shell to run the Mongo backup and restore commands

MongoDB Backup

  1. Ensure MongoDB service is running (Start> Run> services.msc)
  2. Open a Command Prompt as Administrator (referred to as the Mongo DOS Shell)
    Type mongo(command)
    Type show dbs (command) - shown above, to give a list of the dbs available)
    If the MongoDB service is "Running," but the client cannot connect when typing mongo, it's probably because the path to the mongo bin folder hasn't been added to the PC's environment.
    To Add a local path locations variable to a PC environment
    Ex. C:\Program Files\MongoDB\Server\3.6\bin (This will vary based on the version of Mongo)
  3. Open another Command Prompt as Administrator (Standard DOS Shell)
    Use the CD command to navigate to where you would like the backup files to be created
    Ex. C:\Data
    mongodump (command)

The mongodump command creates the dump folder with admin, Keep, Signalr subfolders


MongoDB Restore

  1. In the (Mongo DOS Shell) Prompt
    show dbs (command)
  2. use Keep (command) (Case sensitive)
  3. db.dropDatabase() (command)
  4. Use the Command Prompt as Administrator (Standard DOS Shell)
    mongorestore (command)
    The window should indicate "Finished Restoring Keep.Events," "done" and RESTORE COMPLETE

If there are “E11000 duplicate key error collection” Keep.Events errors, it’s because the collection events are already in the folder and need to be deleted first.



Steps to correct the E11000 duplicate issue: (Stop the service, delete and recreate the DB folder, restart service)

  1. Right-click on the MongoDB service and Stop (you can’t delete files while the service is running)
  2. Delete C:\Data\db folder (not the Data, only DB)
  3. MANUALLY CREATE THE DB FOLDER - Right Click > New Folder and name it DB
  4. Restart the MongoDB service - this creates the necessary files in the DB folder
  5. Once these steps have been done, rerun the mongorestore command
    mongorestore (command)
  6. Verify that users can log into Access Expert with this database
Labels (1)
100% helpful (2/2)