How to configure Archive file location in OpenPDC?


There was a topic which talked about how to change the archive files location in openHistorian by using connection string (such as ArchiveDirectories={D:\Archive1; E:\Archive2; \\myserver\myshare\Archive}; WorkingDirectory=C:\Program Files\openHistorian\Archive\)

However, it looks like that this function only exists in openHistorian (openHistorian.Adapters.LocalOutputAdapter from openhistorian.Adapters.dll)

My question is, is there any way to change the archive files location in openPDC? Our Disk C has very limited space so we would like to change the archive path to Disk D.

Many thanks,

That’s correct - the settings for the 1.0 historian included within the openPDC is configured in the XML configuration file, i.e., openPDC.exe.config.

You can use the XML Configuration Editor tool to change settings here - you can find the tool from the Windows Start Menu (or just run it from the openPDC installation folder, the executable file name is ConfigurationEdtor.exe).

The settings you are looking for can be found in the sections that start with ppa, i.e., the ppaArchiveFile, ppaMetadataFile, ppaIntercomFile and ppaStateFile sections. Within these sections you will need to change all the FileName parameters to have a full path and file name to the new drive location, e.g., D:\Archive\. Keep in mind you will need to add the full path here even if the original setting does not do this – I also recommend keeping the same file names even though you are changing the paths.

NOTE: Before you click Save in this tool, stop the openPDC service (can do this by running Services.msc). Move the entire folder contents of the existing PPA Archive folder to the new drive, e.g., D:\Archive\. Once the files are moved, right-click on the root folder and open Properties. Click on the Security tab then click the Edit button. On the permissions dialog that pops up, click the Add button. In the textbox, type NT SERVICE\openPDC (this assuming your openPDC Windows service is using the default login credentials), then click Check Names and then OK. Making sure openPDC is selected in the Groups or user names: list, check the Modify checkbox under the Allow column in the Permissions for openPDC in the list below, then click OK. This step will make sure the openPDC services has rights to read/write data into this new folder.

After you have moved the files and modified folder permissions, you can now click Save in the XML Configuration Editor tool, this will save settings and automatically restart the openPDC.

If everything was done correctly then at this point your openPDC should be archiving data to a new location.

Good luck!