Navigation Menu

Skip to content

Configuring Multiple Archive Locations

J. Ritchie Carroll edited this page Sep 16, 2016 · 1 revision

The “ArchiveDirectories” connection string parameter can specify any number of paths for archiving data; separate multiple paths with a semicolon.

Normally only a “Working Directory” is specified and archives end up in this folder, a working directory is still required and should be for fast I/O; the working directory path defaults to the openHistorian installation folder “\Archive”, typically, “C:\Program Files\openHistorian\Archive\”.

When a set of archive directories is specified, once enough of an archive is built-up in the working directory, the historian will move files to the archive directories. The archive paths are “filled-up” in order of specification.

There is also a “AttachedPaths” connection string parameter. This parameter allows importing folders and/or files as read-only into the available historian data. Typically this is used for read-only inclusions of time-series data.

You can add any of these settings to the connection string parameter of your current primary phasor archive found under the menu as “Outputs / Historian Instances” in the openHistorian Manager application.

One thing to keep in mind, since paths are separated by a semicolon and key/value pairs in the connection string are also separated by semicolons, you will need to enclose multiple path values in braces, for example:

    ArchiveDirectories={D:\Archive1; E:\Archive2; \\myserver\myshare\Archive}; WorkingDirectory=C:\Program Files\openHistorian\Archive\

Another few things to keep in mind: if drives are physical, you will need to make sure the use “NT SERVICE\openHistorian” is allowed access to the specified drives. Mapped drive letters are typically not visible to the openHistorian service user, so remote paths will need to be specified in UNC format. UNC style mapped paths will need to be authenticated and since the default service user is the openHistorian service user with minimal rights it cannot be used for remote paths. One way to handle this is to use a domain user for the service, e.g., a managed service account, that has access to the to the UNC folders. Another way is to setup simple loggers in the openHistorian.exe.config file to these paths with needed credentials, e.g., the health exporter. For example:

    <healthExporter>
      <clear />
      <add name="ExportTimeout" value="-1" description="Total allowed time for each export to execute, in milliseconds. Set to -1 for no specific timeout."
        encrypted="false" />
      <add name="MaximumRetryAttempts" value="4" description="Maximum number of retries that will be attempted during an export if the export fails. Set to zero to only attempt export once."
        encrypted="false" />
      <add name="RetryDelayInterval" value="1000" description="Interval to wait, in milliseconds, before retrying an export if the export fails."
        encrypted="false" />
      <add name="ExportCount" value="2" description="Total number of export files to produce."
        encrypted="false" />
      <add name="ExportDestination1" value="C:\" description="Root path for export destination. Use UNC path (\\server\share) with no trailing slash for network shares."
        encrypted="false" />
      <add name="ExportDestination1.ConnectToShare" value="False" description="Set to True to attempt authentication to network share."
        encrypted="false" />
      <add name="ExportDestination1.Domain" value="" description="Domain used for authentication to network share (computer name for local accounts)."
        encrypted="false" />
      <add name="ExportDestination1.UserName" value="" description="User name used for authentication to network share."
        encrypted="false" />
      <add name="ExportDestination1.Password" value="" description="Encrypted password used for authentication to network share."
        encrypted="true" />
      <add name="ExportDestination1.FileName" value="Projects\openHistorian\Build\Output\Debug\Applications\openHistorian\Health.txt"
        description="Path and file name of data export (do not include drive letter or UNC share). Prefix with slash when using UNC paths (\path\filename.txt)."
        encrypted="false" />
      <add name="ExportDestination2" value="\\myserver\myshare" description="Root path for export destination. Use UNC path (\\server\share) with no trailing slash for network shares."
        encrypted="false" />
      <add name="ExportDestination2.ConnectToShare" value="True" description="Set to True to attempt authentication to network share."
        encrypted="false" />
      <add name="ExportDestination2.Domain" value="SPP" description="Domain used for authentication to network share (computer name for local accounts)."
        encrypted="false" />
      <add name="ExportDestination2.UserName" value="MyUser" description="User name used for authentication to network share."
        encrypted="false" />
      <add name="ExportDestination2.Password" value="MyPassword" description="Encrypted password used for authentication to network share."
        encrypted="true" />
      <add name="ExportDestination2.FileName" value="\Archive\Health.txt"
        description="Path and file name of data export (do not include drive letter or UNC share). Prefix with slash when using UNC paths (\path\filename.txt)."
        encrypted="false" />
    </healthExporter>

Note that modification of the configuration file should happen only when the service is not running. Also, when you save changes to the connection string for the openHistorian local output adapter singleton, it is best to restart the service.