Alarm Maintenance
Alarm Maintenance Overview
Use the alarm backup feature to maintain a backup copy of alarms when you plan a maintenance activity. Use the alarm restore feature to retrieve the alarms that have been backed up or deleted or to move alarms from one system to the other. Use the alarm purging feature to delete alarms that you do not want to store and to manage disk space better.
To backup, restore, or purge alarms, the latest Historian Administrator and Data Archiver is required. If you point Historian Administrator to an earlier version of the Archiver, the Alarms section appears unavailable and the option to backup only alarms is not accessible. However, the 6.0 (or later) Administrator can be connected to a pre-6.0 archiver to archive alarm data automatically with the archive.
Backing Up Alarms
About this task
When Proficy Historian backs up alarms, it creates a copy of the alarm data in an offline file that can be restored later. The alarms are not removed from the online system. You can backup alarms using Historian Administrator or through a command line program.
For more information on the command line program, refer to Using ihBackupAlarms.exe to Backup Alarms from the Command Line.
To backup alarms using Historian Administrator pointing at a 6.0 or newer archiver:
Procedure
Using ihBackupAlarms.exe to Backup Alarms from the Command Line
When you install Proficy Historian, the alarm backup utility is installed on your computer. The default path for this file is typically: ..\Program Files\Proficy\ProficyHistorian\Server\ihBackupAlarms.exe.
Use the ihBackupAlarms.exe
command to backup alarms for a time period relative to when the program is run. For example, you can backup alarms from -1 day to now. You can only use relative times with this command. If you need to backup a specific start and end time, use Historian Administrator. For more information, refer to the Backing Up Alarms section.
ihBackupAlarms
takes the following optional arguments. If no arguments are supplied, ihBackupAlarms.exe will not backup any alarms.
Parameter | Description |
---|---|
-s serverNodeName | The Proficy Historian node containing the alarms to backup. If the -s is not specified, the program will connect to the local archiver. |
-u Username | The user name required to connect to the Historian archiver. This is an optional parameter. |
-p Password | The password required to connect to the Historian server. This is an optional parameter. |
-b Backup File Path | The file path where you want to place the backup file. If the path is not specified, the backup will be placed in the default archive path as specified at install time. |
-d Relative Number of Days from Current Time | The relative number of days of alarms to backup, counting backwards from the current time. For example, to backup now minus 7 days to now you would use -d 7 . |
-h Relative Number of Hours from Current Time | The relative number of hours of data to back up, counting backwards from the current time. For example, to backup now minus 12 hours, you would use -h 12 . |
-m Relative Number of Minutes from Current Time | The relative number of minutes of data to back up, counting backwards from the current time. For example, to backup now minus 360 minutes, you would do use -m 360 . |
-sec Relative Number of Seconds from Current Time | The relative number of seconds of data to back up, counting backwards from the current time. For example, to backup now minus 120 seconds, you would use -sec 120 . |
Examples of Typical Command Lines for Alarm Backup
ihBackupAlarms.exe-h 24
The alarms will be backed up for 24 hours from now in the default location with the file name as month_ day_year_hour_minute_second.zip. For example,_8_13_2012_6_55_30.zip.
ihBackupAlarms.exe-d 7 -h 12 -m 360 -sec 120 -b c:/AlarmBackups/example
The alarms will be backed up for the mentioned time and stored with the file name as backup_8_12_ 2012_19_7_37.zip
at C:/AlarmBackups/example.
Restoring Alarms
About this task
Restoring alarms to a running system makes them available for query and analysis. You can restore alarms that have been backed up or deleted previously.
To restore alarms:
Procedure
About Purging Alarms
- Even after purging, the data is not lost; a backup is created to maintain an audit trail. You can restore the data if needed.
- When using circular archives (that is, archives that roll over), alarms are purged automatically.
- To maintain alarm data efficiently
- The data is outdated or redundant
- The disk space is limited
- Alarm Attribute Values
- Alarm Attribute Value History
- Delete from Alarm History
- Delete from Alarm Table esignatures
- comments
- Purge data within a specified duration.
- Purge data related to a specific alarm ID.
Purging is performed in batches. You can check the log data in the Proficy.Historian.AandE.Migration.log file. By default, this file is located in the C:\Program Files(x86)\Proficy folder.
- The batch size is changed to 10. That is, the Alarms and Events collector receives an acknowledgement after sending 10 messages, thus reducing the load on the server.
- The waiting time for receiving an acknowledgement is automatically incremented after each failure per batch, starting from 90 seconds to 270 seconds. This gives more time for the server to respond.
If the time taken to purge exceeds the timeout limit, instead of reverting the entire purging operation, only the current batch, which is still under processing, is purged.
- Restart the Alarms and Events services before purging data.
Purge Data Within a Specified Duration
Before you begin
Procedure
Purging Alarms Using Alarm IDs
To purge alarms using an alarm ID, use the Alarms.PurgeAlarmsById
to develop an SDK program. For more information, refer to the SDK sample in SDK Help.
Using ihPurgeAlarms.exe to Purge Alarms from the Command Line
When you install Proficy Historian, the alarm purge utility is installed on your system at install time. The default location for this file is typically: ..\Program Files\Proficy\ProficyHistorian\Server\ihPurgeAlarms.exe.
The ihPurgeAlarms.exe
command takes the following optional arguments. If no arguments are supplied, ihPurgeAlarms
will not purge any alarms.
Parameter | Description |
---|---|
-s serverNodeName | The Proficy Historian node you wish to access archive data on. If the -s is not specified, the program will connect to the local archiver. |
-u Username | The password required to connect to the Proficy Historian archiver. This is an optional parameter. |
-p Password | The password required to connect to the Historian archiver. This is an optional parameter. |
-b Backup File Path | The file path where you want to place the file containing the purged alarms. If the path is not specified, the backup will be placed in the default archive path as specified in the Administrator. |
-z 1 ZIP File | Saves the alarms in a ZIP file format. |
-d Relative Number of Days prior to Current Time | Purge alarms older than this time. For example, to purge alarms older than 7 days old, you would use -d 7 . |
-h Relative Number of Hours prior to Current Time | Purge alarms older than this time. For example, to purge alarms older than 12 hours, you would use -h 12 . |
-m Relative Number of Minutes prior to Current Time | Purge alarms older than this time. For example, to purge alarms older than 360 minutes, you would use -m 360 . |
-sec Relative Number of Seconds prior to Current Time | Purge alarms older than this time. For example, to purge alarms older than 120 seconds, you would use -sec 120 . |
- Specify the path for saving backup files if you want to back up the alarms before purging. If you do not mention the path for backup files but select the zip the file option, then the backup will be placed in the default archives folder with the endstamp.zip as the file name. To select the zip file option, use
-z 1
in the command line. - Specify the backup folder path name in double quotes such as "C:\\backup\\".
- Alarms will be deleted from current time the relative time prior to current time.
Examples of Typical Command Line for Alarm Purge
To purge alarms older than 36 hours old, use the following command:
ihPurgeAlarms.exe -h 36
The alarms older than 36 hours will be purged and an audit log will be created at ..\Proficy Historian Data\LogFilesfolder.
To purge alarms older than 36 hours, doing a backup first, use the following command:
ihPurgeAlarms.exe -h 36 -z 1
A .zip file will be created as a backup file in the default location and the alarms older than 36 hours will be purged.