Configure Archives
Configure Archives
- Machinename_Config.ihc : a single .IHC file containing information about the archiver, tag configuration, and collector configuration.
- Machinename_ArchiveXXX.iha: an archive data file where x is a number indicating the place of the file in a time-based sequence.
Archive files grow to a user-configured maximum size as data is recorded by the server. Historian will asynchronously create a new empty archive when data starts loading into an existing archive. Whenever the current archive becomes full, Historian will immediately serve data to a newly created archive. This significantly reduces archive creation and transition time. If the automatic create archive option is not enabled, however, you must open a new archive manually.
If you enable the Overwrite Old Archives option, the system replaces the oldest archived data with new data when the latest archive default size has been reached. Since this action deletes historical data, exercise caution in using this feature. Be sure that you have a backup of the archive so that you can restore it later. Best practice is to create an additional archive to prevent premature loss of data due to overwriting. For example, if you want to save 12 months of data into 12 archives, create 13 archives.
During archiver startup and every 60 seconds while the server is running, Historian checks to make sure you have configured enough free disk space to save the archives, buffer files, and log files. If there is insufficient disk space, the Data Archiver shuts down and a message is logged into the log file. By default, you can view the Historian archiver log file in C:\Historian Data\LogFiles
[03/03/10 15:28:41.398] Insufficient space available in [d:\Historian\Archives\]
[03/03/10 15:28:41.399] The server requires a minimum of [5000 MB] to continue
[03/03/10 15:28:41.679] USER: DataArchiver TOPIC: ServiceControl MSG: DataArchiver(DataArchiver)
Archiver shutdown at 03/03/10 15:28:41.653
[03/03/10 15:28:41.807] DataArchiver Service Stopped.
[03/03/10 15:28:41.809] [d:\Historian\LogFiles\DataArchiver-34.log] Closed.
Setting Archive Size
Since archived data files can become quite large, you should adjust system parameters carefully to limit data collection to meaningful data only and minimize the required size of system storage. This chapter describes techniques you can use in your application to accomplish these goals. Historian now supports a maximum Archive Size of 256 GB per archive.
For each archive, you need approximately 1MB of archive space for every 1000 tags to store tag information. Archive size is a function of the rate at which you archive data and the time period you want the archive to cover. A typical user wants the archive to cover a time period of, say, 30 days. Factors that affect the rate at which you archive data are
-
Number of tags: A large number of tags.
- Polling frequency of each tag: A high polling frequency of each tag.
- Compression settings: Disabling compression or setting narrow deadband parameters.
- Data types: Choosing data types that increase the number of bytes per value.
Example
The following is an example of a manual calculation of required archive size, using typical parameter values. This example archive needs to contain data collected over 30 days.
Assumptions:- No. of tags: 5000
- Polling rate: 1 value/5 seconds
- % Pass Compression: 5%. Pass Compression is the number of data values archived relative to the number of values read, expressed as percent.
- Bytes/value: 4
- Duration: 1 month (30 days)
The calculation shows that a file size of 500 MB is adequate for archiving one month of data for this application.
It is recommended that you set the default archive size to 500 MB for systems with 1000 tags or more. If you believe the computed size is too large for your application, you can modify parameters as follows:- Decrease the polling frequency.
- Increase compression deadband, reducing the pass percentage.
- Reduce the number of tags.
- Add more disk capacity to your computer.
Archive Size Calculator
An Archive Size Calculator tool is available to estimate archive size based on your input and estimates the archive size and collector compression based upon a tag that has already been configured. Log on to http://digitalsupport.ge.com to download this and other GE Intelligent Platforms freeware product solutions.
Creating Archives
New archives can be created automatically once the existing archive reaches a size limit or when a specific amount of time has elapsed since the last archive creation.
Archives based on size
collect data until they reach the specified storage limit. Once the limit is reached, a new archive is created and the data is loaded into that archive. Historian supports a maximum archive size of 256 GB per archive.
To create an archive based on size:
- Open the Data Store Maintenance screen and click the Data Store Options tab.
- In the Archive Creation section, in the Default Size (MB) field, select the BySize option from the drop-down list.
- Enter the size that you want to set to the archive. By default, the size is 100 MB.
- Click Update. An archive based on size is created.
Archive Creation based on Duration
To create an archive based on duration:
- Open the Data Store Maintenance screen and then click the Data Store Options tab.
- In the Archive Creation section, in the Archive Duration field, select the Days or the Hours option from the drop-down list. Note: If the archive is based on size, the Default Size (MB) field is displayed next to the drop-down list. If you select either the Days or Hours options, the Default Size (MB) changes to Archive Duration field.
- Enter the number of days/hours for which you want to create archives.
- Click Update. Depending on what you selected, an archive, based on days/hours is created. Note: Setting the day as 1 means that a new archive will be created every day starting from the time your first archive is created. The next archive is created after one day, 24 hours from the time the first archive was created.
Setting the hours as 1 means that a new archive will be created after every hour starting from the time your first archive has been created. You can observe the archives on the left side, under Archives, with the name of the archive and start time for each archive.
Back Up Archives Automatically with ihArchiveBackup.exe
The Historian installation automatically installs an archive backup utility on your system at install time. The default path for this file is typically located in ..\Program Files\Proficy\Historian\Server\ihArchiveBackup.exe.
AT 23:59 /EVERY:M,T,W,Th,F "ihArchiveBackup.exe [-s ServerNodeName] [-u Username]
[-p Password][-t TimeoutSecs][-n NumberOfArchives] or [-a ArchiveName]"
ihArchiveBackup.exe takes the following optional arguments. If no arguments are supplied, ihArchiveBackup.exe backs up the current Historian archive.
Switch | Parameter | Description |
---|---|---|
-s | serverNodeName |
The Historian node to access archive data on. |
-u | Username |
The user name required to connect to the Historian archive. |
-p | Password |
The password required to connect to the Historian archive. |
-t | TimeoutSecs |
The time, in seconds, to wait before timing out and failing. |
-n | NumberOfArchives |
The number of archives to back up, counting backwards from the current archive. |
-a | ArchiveName |
The name of a specific archive to back up. |
-c | none | Backs up only the Historian configuration (IHC) file . |
-d | DataStoreName |
The name of the data store to store your archive data. Note: Using one instance of ihArchiveBackup.exe you can point to one data store, and by using multiple instances you can point to multiple data stores.
|
Configuring Automatic Backup for Windows XP
Configuring Automatic Backup for Windows Vista, Windows 7 or Windows Server 2008
Back up Archives with Historian
Best practice is to back up your Historian archive files periodically to ensure your data is protected. Historian bundles alarm and event data with tag data in its backup files. Once an archive has been backed up, it can be stored to a shared network location, stored off-site, or written to physical media.
-
The .IHC file is automatically backed up when, and only when, you backup the current archive .IHA file. By default, the .IHC backup path is the same as the archives path.
- The .IHC uses the following naming convention: ComputerName_Config-Backup.ihc. If the default backup path is different than the archives path, the .IHC file is copied to the backup folder with the standard .IHC naming convention: ComputerName_Config.ihc.
-
In the Mirroring system, the Client Manager sends a backup message to the Data archiver located on the Client Manager node to which the user is connected. The backup, then, happens in the specified location on that node. If that Data archiver is not running the user will get a NOT_CONNECTED error message and the backup will not happen.
- If you back up an archive more than once, the backup tool will (by default) attempt to use the same name for the backup file and will detect that an archive with the same name already exists. Rename the backup archive file or move the original backup archive file from the target backup directory.
For more information on archiving, refer to Backing up an Archive Manually.
Zipping backup files
By default, Historian 7.0 SP1 does NOT store backup files as ZIP files. If you want to store backup files as ZIP files, then you can manually configure registry keys to specify this.
- If you are collecting alarms, then your alarms may not be backed up.
- You cannot export alarms to another Historian server.
- Disaster recovery of data may be limited.
Backing up alarm data
When backing up your Historian archives, any alarms with a life cycle that overlaps the data archive being backed up will be included. This means that an alarm with a long life cycle can be included up in multiple backups. For example, say the following alarm and archive dates were the following:Alarm/Data Archive | Start Time | End Time |
---|---|---|
Alarm1 | 09/02/2004 | 09/06/2004 |
Archive1 | 09/01/2004 | 09/03/2004 |
Archive2 | 09/03/2004 | 09/04/2004 |
Archive3 | 09/04/2004 | 09/06/2004 |
If any or all of these archives are backed up, Alarm1 will go into the backup for each. When the archives are restored, Historian will analyze the included alarm data and, if already in the Historian archive, is intelligent enough to know it already has the alarm.
Backing up an Archive Manually
- Ensure you have enough hard drive space on your default backup location before backing up your archives.
- Always back up archives before a planned Historian software product upgrade.
- Use Microsoft Volume Shadow Copy Service when backing up archive files that are more than 2 GB in size or when backing up more than the last two archives. For more information, refer to Back Up Archives with Volume Shadow Copy Service.
Enabling or Disabling Archive ZIP Compression
Changing Alarm Timestamp Check Intervals
Adding, Backing up and Restoring Archives
You may need to add an archive when the current archive is nearly full and you have not enabled automatic creation of archives. You may need to restore an archive when you start up after an unplanned shutdown or when you need to retrieve data from an old, inactive archive. You may need to backup and archive before a planned Historian software product upgrade.
Adding Archives
- In the Details Tab, set File Attribute to Read/Write.
- In the Global Options Tab:
- Set Maximum Query Time (seconds) to 60 seconds.
- Set Maximum Query Intervals to 100000 intervals.
- Set Automatically Create Archives to Disabled.
- Set Overwrite Old archives to Enabled.
- Set Maintain Auto Recovery Files to Enabled.
- Set Store OPC Quality to Disabled.
- In the Security Tab:
- Set Data is Readonly After (Hours) to 1 month.
- Set Security Groups to use local.
- set Generate Message on Data Update to Disabled.
- set Require Point Verification to Disabled
If you receive the error message r;Runtime error 330 Invalid Property Value" while creating multiple archives on a remote machine, it is probably because you do not have enough hard disk space on that machine. When you click OK on the error message, Historian Administrator may disappear. You must now clean up the remote machine's hard disk space and restart the Historian Administrator.
Adding a new Archive
Restoring Archives with Historian
Under certain circumstances, you may want to restore tag and alarm and event data to Historian. This may be after an unplanned shutdown, or you may need to retrieve data from an old, inactive archive.
Before restoring an archive from a removable disk, copy the archive file to the normal archive path and then restore the archive from that location. Leave the original backup file in the backup file folder.
Archives that have been previously removed from Historian can be found in the \Archives\Offline directory.
Configuring System File Cache Memory
Back up Archives with Volume Shadow Copy Service
Use the Microsoft Volume Shadow Copy Service to back up large archive files, or if you want to back up more than the last two archives, as it allows you to backup and restore archives reliably and in a short period of time without affecting the data collection.
The Volume Shadow Copy feature is provided by Windows Operating System, and the instructions to use backup and restore vary depending on the backup application that is used in the Windows operating system.
VSS provides fast volume capture of the state of a disk which is called a snapshot or shadow copy. When the snapshot is taken, disk writes are suspended for a brief period of time, typically on the order of milliseconds. After the snapshot, disk writes can resume, but the original state of the files are maintained by a difference file. The difference file allows the state of the original file at the time of the snapshot to be reconstructed. This behavior allows files to be backed up while new data is being written to files.
If you are using ihArchiveBackup.exe before the upgrade, your backup will continue to work in the same or similar manner as it did before the upgrade. There is no change in the backup procedure and the Auto Recovery Backup Files option remains unchanged.
Microsoft uses a backup format called Virtual Hard Disk (VHD) to back up files.
When you create archives backup using Microsoft Volume Shadow Copy Service, you must first restore the archives files (that is, .bkf or .vhd into .iha) using the Windows Restore wizard, and then restore the archives (.iha) into Historian. For more information on restoring an archive (.iha) into Historian, refer to the Restoring an Archive topic.
- Use Microsoft Volume Shadow Copy Service when you want to back up archive files that are more than 2 GB in size, or if you are backing up more than your last two archives.
- Ensure you have enough hard drive space on your default backup location before backing up your archives.
Backing up Archives Using Shadow Copy Service on Windows Server 2008 or 2008 R2
If you need additional assistance about using Windows Server Backup Wizard, refer to Microsoft's website at: http://technet.microsoft.com/en-us/library/cc75352aspx.
In addition to using the Backup and Restore wizard, you can also use the command line utilities. Refer to the following website for information on how to use command line parameters with the Ntbackup command: http://support.microsoft.com/kb/814583 Refer to the following website for information on how to use command line parameters with the Wbadmin command: http://technet.microsoft.com/en-us/library/cc754015(WS.10).aspx.
Backing up Archives Using Shadow Copy Service on Windows Vista or Windows 7
Backing up Archives Using Shadow Copy Service on Windows XP, Server 2003, or Windows XPe
Restore Archives with Volume Shadow Copy Service
Microsoft uses a backup format called Virtual Hard Disk (VHD) to back up files. When you restore archive backups using Microsoft Volume Shadow Copy Service, you must stop the online Historian archiver, convert the shadow archive files (.bkf or .vhd) into archive files (.iha) using the Windows Restore wizard, and then restore the archives (.iha) into Historian.
Restoring Archives Using Shadow Copy Service on Windows Server 2008 or 2008 R2
This procedure will restore an archive using Microsoft Volume Shadow Copy Service on Windows Server 2008 or Windows Server 2008 R2.
To access backup and recovery tools for Windows Server 2008, you must install backup and recovery tools first. For more information about Installing Widows Server Backup Tools, refer to Microsoft's website at: http://technet.microsoft.com/en-us/library/cc770266(WS.10).aspx.
If you need additional assistance with using Windows Server Recovery Wizard, refer to Microsoft's website at http://technet.microsoft.com/en-us/library/cc77202aspx.
Restoring Archives Using Shadow Copy Service on Windows Vista or Windows 7
Restoring Archives Using Shadow Copy Service on Windows XP, Server 2003, or Windows XPe
Remote Storage of Archives
Historian can store current and backup archive files on remote storage devices. These remote storage devices can consist of network shares, Storage Area Networks (SAN), or Network Attached Storage (NAS) devices. You can also employ a hybrid approach, by storing your current archive on the local disk and writ- ing a script using the Historian SDK to migrate older archives to a remote storage device.
A SAN is a dedicated network apart from a LAN, specifically configured to allow servers to communicate with large storage arrays, usually over fibre-optic cables. The SAN is directly accessible as a disk device to Windows and does not operate through the slower network layer. NAS devices are similar to a SAN, but are directly attached to the LAN, appearing as a server.
If the Data Archiver service is not working, view the Messages page. Messages like these indicate that Historian is trying to use mapped drives: "Path N:\ not found." "Mapped drives unsupported as archive or backup file location" "UNC paths inaccessible when running as LocalSystem, configure other logon account for DataArchiver service".
If these messages appear, find and change mapped drives to UNC paths.
Example: Migrating Non-Current Archives to a Remote Location
The following sample VBScript code will migrate non-current archive to a remote location by accessing the Historian SDK. This script could be run at specific intervals to migrate data from a local disk to a network share.
Dim FileSystem
set FileSystem = CreateObject("Scripting.FileSystemObject") Dim remoteLocation
remoteLocation = "\\StorageServer\Historian\Archives"
If InStrRev(remoteLocation, "\") Len(remoteLocation) Then remoteLocation = remoteLocation & "\"
' make sure we can access the remote storage before proceeding
Dim TestFile
set TestFile = FileSystem.OpenTextFile(remoteLocation & "Test.txt", 2, True, 0) If TestFile is Nothing Then
err.Raise 1, , "Unable to access remote storage location" End If
TestFile.Close
FileSystem.DeleteFile remoteLocation & "Test.txt" Dim Server
set Server = CreateObject("iHistorian_SDK.Server") If Server is Nothing Then
err.Raise 1, , "Unable to create iHistorian_SDK.Server object" End If
Dim archivesToMigrate(), i
If Server.Connect() Then
With Server.Archives
Dim backupPath
backupPath = .ArchivingOptions("ArchiveBackupPath")
If InStrRev(backupPath, "\") Len(backupPath) Then backupPath = backupPath & "\" ReDim archivesToMigrate(.Item.Count, 2)
For Each archive in .Item
If Not archive.IsCurrent Then
If UCase(Left(archive.FileName, InStrRev(archive.Filename, "\"))) UCase(remoteLocation) Then i = i + 1
archivesToMigrate(i, 0) = archive.Name
archivesToMigrate(i, 1) = backupPath & "Offline\" & cstr(archive.Name) & ".zip" archivesToMigrate(i, 2) = archive.FileSizeTarget
End If
End If
Next
Dim j
For j = 1 To i
If .Delete(cstr(archivesToMigrate(j, 0))) Then FileSystem.MoveFile archivesToMigrate(j, 1), remoteLocation Dim archive
set archive = .Add(cstr(archivesToMigrate(j, 0)), cstr("%%inplace%%" & remoteLocation & archivesToMigrat
If Not (archive Is Nothing) Then
FileSystem.DeleteFile remoteLocation & archivesToMigrate(j, 0) & ".zip" End If
End If
Next End With Server.Disconnect
Else
err.Raise 1, , "Failed connecting to server"
End If
Configuring the Data Archiver Account for Remote Storage
By default, the Data Archiver service is installed under the LocalSystem account, which has no credentials to access network resources. In order to use Remote Storage, you must first configure the DataArchiver service to run under a user account that has read/write access to the network location.
- Stop the Historian Data Archiver service.
- Open the Services Control Panel.
- Right-click on the Historian Data Archiver service and choose Properties
- Click the Log On tab.
- In the Log on as field, select This Account .
- Enter the user account you want the Historian Data Archiver service to run under. This account must have write privileges to your Storage Area Network.
- Enter the password for the user account.
- Restart the Historian Data Archiver service.
Reusing Archive Configuration Files
Example: Reusing Archive Configuration Files
In this example, you have a production Historian with a machine name "WaterSite" and want to load that configuration on a testbed Historian called "LabSite1". The testbed Historian is already running and already has a config file called "LabSite1_CentralConfig.ihc."
- Stop the services and delete LabSite1_CentralConfig.ihc.
- Rename WaterSite_CentralConfig.ihc to LabSite1_CentralConfig.ihc.
- At the command line, run the following:
ihConfigManager_x64.exe RenameDHSNode WaterSite LabSite1