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 the Historian Administrator to an earlier version of the Archiver, the Alarms tab 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
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 the 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 the Historian Administrator pointing at a 6.0 or newer archiver:
Using ihBackupAlarms.exe to Backup Alarms from the Command Line
The Proficy Historian install program automatically installs an alarm backup utility 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 the 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 Proficy Historian archiver. This is an optional parameter. |
-p Password |
The password required to connect to the Proficy 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
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:
About Purging Alarms
Purge or delete alarms only if you need to maintain the alarm data efficiently. You may purge alarms if they become outdated or redundant, or due to limited disk space. Purging alarms gives you the flexibility and control of deleting alarms for a specified time range or using a specific alarm ID. Purge alarms using a time range when an entire time period of alarms is no longer of interest. Purge alarms by ID when you need to preserve certain alarms in a time range and remove the others.
The purged alarms are not lost but are moved to a backup file that can be restored on the current system or another system, if needed. Also, an audit trail entry is made indicating the user and time range purged. An audit trail ensures that the alarm data was not purged unintentionally, and is recorded for any auditing purpose for future use.
To purge alarms, you need to be a member of the ihSecurityAdmins
security group. To protect against accidental purge, make sure that only certain people are members of this group.
You can purge alarms from the Administrator or through a command line program. For more information, refer to Using ihPurgeAlarms.exe to Purge Alarms from the Command Line section.
Purging Alarms Using a Time Range
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
The Proficy Historian install program automatically installs an alarm purge utility 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.