PreEmptive Analytics Standalone Repository User Guide

Data Management

Backup and migration

Backup of the Standalone Repository is handled through standard Mongo backup procedures. This guide details the preferred way to backup the data in order to maintain portability and minimize disk usage.


You may wish to put the mongodb\bin directory on the system path.


  1. Open a Command Prompt
  2. Change to the output directory: cd <your_output_directory>
  3. Export the data with mongodump: mongodump -d PreEmptiveRepository -c Data
    • Note: this will export the data into a dump subdirectory, by default. You can override this with the -o argument


  1. Open a Command Prompt
  2. Change to the directory with the exported data: cd <your_output_directory>
  3. Import the data with mongorestore: mongorestore
    • Note: if you changed the exported subdirectory's name from the default of dump, you should specify the new name as part of the command: mongorestore <new_name>.

It is safe to import into a Repository that already has data, as long as the source Repository and destination Repository have the same product version. Any matching records will be skipped.

Migration via database copy

Alternatively, the MongoDB files can be directly copied to a new destination. To do so:

  1. Turn off the Repository endpoint in IIS
  2. Turn off the MongoDB service
  3. Copy all the PreEmptiveRepository.* files from your MongoDB data directory (default d:\data\db\) to the destination
    • The files will be numbered 0 through <n> and there will also be a .ns file.
  4. Turn on the MongoDB service
  5. Turn on the Repository endpoint in IIS

Note that this method may result in a larger dataset because the raw MongoDB files include pre-allocated space and detailed index data that isn't included in the export described above.


If you wish to empty your Standalone Repository database (e.g. for testing or system administration), follow this procedure:

  1. In IIS Manager, stop the PreEmptive Analytics Standalone Repository website.
  2. From a command prompt, run c:\mongodb\bin\mongo PreEmptiveRepository --eval "db.dropDatabase()".
  3. In IIS Manager, start the PreEmptive Analytics Standalone Repository website.

The Standalone Repository service will automatically recreate the database, and start storing any new data it receives.

Standalone Repository Version 1.1.0. Copyright © 2015 PreEmptive Solutions, LLC