PreEmptive Analytics Workbench User Guide

Backup Procedures

The Workbench is well-suited to point-in-time filesystem snapshots. By using such a feature, a backup of the current state of the Workbench can be saved, and restored at a later point.

Considerations

Before creating a plan for backups, read this section carefully, and then consult one of the following backup strategies:

  • Full Backup (recommended) is easier to manage and collects more complete configuration data.
  • Partial Backup produces smaller backups, but requires more specialized management and a longer restore process.

MongoDB Instance

In addition to configuration files, the MongoDB instance, which contains the Workbench's database, can also be backed up via snapshots of the filesystem. However, in order to do so, some conditions must be met, especially:

To get a correct snapshot of a running mongod process, you must have journaling enabled and the journal must reside on the same logical volume as the other MongoDB data files. Without journaling enabled, there is no guarantee that the snapshot will be consistent or valid.

The recommended MongoDB installation supports this, but if you are using a different configuration, please ensure these conditions are met.

Working with Non-atomic Snapshots

This page assumes a point-in-time snapshot tool to prevent issues of inconsistent data or database corruption. If the snapshot tool does not operate atomically, it will be necessary to disable the entire Workbench before a backup, and then re-enable it after the backup is made, and when restoring from such a backup. Note that this causes an outage for the server.

We also recommend using this process when using tools for MongoDB, such as mongodump.

Other PreEmptive Analytics Products

Because a PreEmptive Analytics Data Hub is installed on the same machine as the Workbench, it will share a RabbitMQ instance with the Workbench; any envelopes queued by either product will be preserved by the backup.

Similarly, if a PreEmptive Analytics Standalone Repository is installed on the same machine as the Workbench, these products will share the same MongoDB instance, so backing up the Workbench will also back up the contents of the Repository.

If either of these products are installed on the Workbench's machine, their configuration files will need to be backed up, and their websites and services stopped and started when disabling and enabling the server for backup and restore. The steps below list these as appropriate.

All other products, such as the PreEmptive Analytics Replayer, are not included in these steps.

Miscellaneous

During a restore, the server and its software will be offline. The amount of time the server is offline, not taking into account your particular backup tool's restore process, will be a few minutes for a full backup, or several minutes to an hour for a partial backup.

It is useful to test the restore process on a regular basis, to ensure your snapshot tool is correctly able to save and retrieve the state of the Workbench.

We also recommend backing up the source code for any Plugins you deploy.

Full Backup

A full backup will save the state of the host, ensuring a consistent view of the various components of the Workbench. This also preserves any changes made to the IIS configuration, local configuration files, etc., and is easier to manage. For these reasons, we recommend performing a Full Backup over a Partial Backup.

Backup

Your backup should target the following drives:

  • The entire OS drive (i.e., C:\).
  • The drive containing the RabbitMQ data folder. (The recommended installation places this at C:\ProgramData\PreEmptive Solutions\PreEmptive Analytics Data Hub\RabbitMQ Data, so the previous item captures this folder automatically in that case.)
  • The drive containing the MongoDB data folder. (P:\data\db in the recommended installation.)

Restore

To restore a Full Backup:

  1. Restore the saved snapshot using your backup software.
  2. Depending on the restore procedure, the Workbench might not be fully enabled. Follow the steps to re-activate the workbench to ensure it is.

Partial Backup

If a Full Backup is not possible, the Workbench may be backed up in a partial state, which comes with several limitations:

  • The RabbitMQ, MongoDB, and all PreEmptive Analytics software must be re-installed after a restore
  • Any custom Plugins must be re-deployed
  • Any customization to the IIS websites will not be preserved

Backup

Your backup should target the following locations:

  • RabbitMQ data folder (the recommended installation places this at C:\ProgramData\PreEmptive Solutions\PreEmptive Analytics Data Hub\RabbitMQ Data)
  • MongoDB data folder (P:\data\db in the recommended installation)
  • MongoDB configuration file (C:\mongodb\mongod.cfg in the recommended installation)
  • Portal configuration folder: <Installation Folder>\IIS\Portal\config
  • OS Mapping file: <Installation Folder>\config\OSMappings\default matches.json
  • Application configuration files for the Workbench:
    • Endpoint Web Service: <Installation Folder>\IIS\Endpoint\Endpoint\Web.config
    • Computation Service: <Installation Folder>\Windows\Computation Service\WorkbenchComputationService.exe.config
    • Query Web Service: <Installation Folder>\IIS\Interaction\Web.config
    • Share Service: <Installation Folder>\IIS\FacJSON\Web.config
    • Portal: <Installation Folder>\IIS\portal\web.config
  • Logging configuration files for the Workbench:
    • Endpoint Web Service: <Installation Folder>\IIS\Endpoint\Endpoint\NLog.config
    • Computation Service: <Installation Folder>\Windows\Computation Service\NLog.config
    • Query Web Service: <Installation Folder>\IIS\Interaction\NLog.config
  • Configuration files for the Data Hub also on the host:
    • Dispatch Configuration: <Data Hub Installation Folder>\DispatchService\Dispatch.config
    • Dispatch Service Configuration: <Data Hub Installation Folder>\DispatchService\HubDispatchService.exe.config
    • Dispatch Service Logging Configuration: <Data Hub Installation Folder>\DispatchService\NLog.config
    • Endpoint Configuration: <Data Hub Installation Folder>\Web\Web.config
    • Endpoint Logging Configuration: <Data Hub Installation Folder>\Web\NLog.config
  • Configuration files for the Standalone Repository if it is installed on the host:
    • Endpoint Configuration: <Standalone Repository Installation Folder>\Web.config
    • Endpoint Logging Configuration: <Standalone Repository Installation Folder>\NLog.config

Note the following information, as it will be important when restoring:

  • The location of the Workbench and, if applicable, Data Hub and Standalone Repository installation folders.
  • The locations of the RabbitMQ and MongoDB data folders.
  • Which custom Plugins are installed (<Installation Folder>\config\plugins). Either target the DLLs as part of the snapshot, or ensure you have the source code to rebuild them after a restore.

Restore

To restore:

  1. Restore the saved snapshot using your backup software.
  2. If Plugin DLLs were not backed up:
    1. Create the folder <Installation Folder>\config\Plugins\local and any other folder that contained Plugins.
    2. Compile and deploy those Plugins that were active in the previous install, with the caveat that it is not necessary to start/stop Workbench components (as they have not been installed).
  3. Follow the installation instructions, taking care to choose the same folders as before for the following:
    • Data Hub installation folder
    • RabbitMQ data folder
    • MongoDB data folder
    • Workbench installation folder
  4. If the Standalone Repository was previously installed, install it now, taking care to choose the same installation folder as before.
  5. Check that the Workbench is functioning correctly:
    1. Check that no errors are being reported in the PA Workbench Event Log (Run > eventvwr).
    2. Check that new data is being made available for the Portal.

Disabling Workbench

To disable the Workbench server:

  1. Disable the entire IIS Server (from Run > inetmgr). This will also disable other products that use IIS.
  2. Stop the following services (from Run > services.msc):
    • PreEmptive Analytics Data Hub Dispatch Service
    • PreEmptive Analytics Workbench Computation Service
    • RabbitMQ
    • MongoDB

Re-Enabling Workbench

To re-enable the Workbench server after it has been disabled:

  1. Start the following services (from Run > services.msc):
    • RabbitMQ
    • MongoDB
    • PreEmptive Analytics Data Hub Dispatch Service
    • PreEmptive Analytics Workbench Computation Service
  2. Enable the entire IIS Server (from Run > inetmgr).
  3. Start the the following IIS Web Sites and their associated Application Pools (from Run > inetmgr):
    • PreEmptive Analytics Workbench Endpoint
    • PreEmptive Analytics Workbench Portal
    • PreEmptive Analytics Data Hub
    • PreEmptive Analytics Standalone Repository (if installed)
  4. Check that the Workbench is functioning correctly:
    1. Check that no errors are being reported in the PA Workbench Event Log (Run > eventvwr).
    2. Check that new data is being made available for the Portal.


Workbench Version 1.2.0. Copyright © 2016 PreEmptive Solutions, LLC