Migrating Historian Data
Migrating the Alarms and Events Database from 4.5 to 7.0
To migrate your alarms into the new alarm database, you must do a backup of the old alarms and restore them into the new database. The backup can be done before upgrade using the old Historian Administrator or it can be done after upgrade using the Proficy Alarm Database Migration Tool.
Backing Up Alarm and Event Data
Migrating Historical Alarm and Event Data after Upgrade from 4.5
If you are upgrading to this version of Historian and you have already collected alarms, you can migrate the Historical Alarm and Event data after upgrading. Alarms are not available for retrieval until they are migrated. New alarms collected will be available immediately.
Before migrating alarm and event data, ensure that you have backed up the data.
To migrate your alarms into the new alarm database, you must do a backup of the old alarms and restore them into the new database. The backup can be done before upgrade using the old Historian Administrator or it can be done after upgrade using the Proficy Alarm Database Migration Tool.
To launch this tool, go to \Program Files (x86)\Proficy\Proficy DataBase folder and run Proficy.Historian.AandE.Migration.exe.
Using the Migration Tool
The IHA Migration Tool (MigrateIHA.exe for 32 bit or MigrateIHA_x64.exe for 64 bit) allows you to migrate data up to 30 years old if the data is already stored in IHA files from any version of Historian. Use the Migration Tool to move data from one archiver to another when you cannot simply restore the IHA in the Historian Administrator.
The Migration Tool opens an IHA file as a binary data file and reads the raw samples from it. Those raw samples are then written to a destination archiver, in a similar way to how an OPC collector or File Collector would write data. Any errors returned from the data archiver are reported in the main window and repeated in the log file.
- You can migrate UserDefined types, MultiField tags, and Array tags.
- When you are migrating the Data Stores, the source data store is created in the destination.
- Using this Migration Tool, you can upgrade from two previous versions of Historian to the latest version.
- The performance of this tool is impacted with the addition of Client Manager and Configuration Manager. For best performance, use this on a Single Server install only.
Migrating Historical Data
To migrate historical data stored in IHA files from any version of Historian:
Configuring Migration Options
Server Pane
Field | Description |
---|---|
Server | The default server (set during installation). If you do not want to write data to the default server, enter the desired server in this field. |
Username and Password | If you have created and established Security Groups in your Historian Security Environment, you may need to enter the user name and password here. By default, if you do not supply any information, the current logged in user will be used in security checking. For more information about Historian Security, please refer to the Implementing Historian Security chapter. |
Options Pane
Field | Description |
---|---|
Throttle Output | Select this option to throttle any part of the migration process. Optionally, you can remove this option as required. By default, throttling is rated at 5000 events per second. If you select this option, the migration might be a bit slow. |
Migrate Messages | Select this option to migrate the messages into the newly created archive. Using this option may or may not reduce the size of your archives, depending on the number of messages stored in the archive. By default, messages are migrated. |
Log File Full Name | Modify the location of the IHAMigration.log. |
Config File | The configuration (*.IHC) file that you want to migrate. You must provide the IHC file before selecting an IHA file. Do not specify an IHC file currently in use by the Data Archiver. Tip: It is always advisable to take a copy of the configuration file and work on the copy rather than working on the original file.
|
Tags to Migrate Pane
Option | Description |
---|---|
Migrate All Tags | Select this option to migrate all the tags from the selected archiver. |
Migrate only tags that exist in destination | Select this option to migrate all the tags that exists in the source destination. |
Migrate using tag mask | Select this option to migrate tags with the mask specified. You can specify an exact tag name to migrate that tag only. |
Migrate only tags that exist in source config file | To migrate the tags that are present only with the source config file. |
Time to Migrate Pane
Option | Description |
---|---|
Use IHA TimeFrame | Select this option to migrate all the tags which has the IHA time frame. |
Use Below TimeFrame | Select this option to migrate all the tags in the specified time frame. You need to specify the Start Date/Time and End Date/Time if you select this option. |
Data Migration Scenarios
You can migrate tags and their data on the same Historian Server or between servers. When migrating your data, consider the following guidelines:
- Get new collection working first
When the data is collected from the collectors or the API programs, then you should consider adding the tag definitions into the destination server and directing data to be written there before you start migration, because migration may take several hours or days.
- Migrate data from oldest to newest
It is advisable to migrate the oldest data first and then the newest, to make the optimal use of archive space.
- Pay attention to TagID
Every tag in Historian 4.5 and above has a property called TagID, that uniquely identifies it and allows data retrieval to locate the data. Even if you have a tag of with the same name in another archiver, that tag has a different TagID and is considered as a different tag. You can see the TagID of a tag in the Excel Tag Export. Preserve that number when moving a tag from one system to another.
The following are commonly used scenarios while migrating data on the same Historian server or between servers.
- Migrating a Tag and its data from one data store into another data store. See
- Merging a Historian Server into an existing data store on another machine. See Merging a Historian Server.
Migrating a Tag and its Data
Consider when data is collected for the year 2009 in Tag1
. The collected data is archived in the default User data store. If you want to move Tag1
residing in the User
data store to another data store, (for example, the Motor
data store), then you must create the Motor
data store if it does not already exist and if your license allows it.
The next step is to change the data store of the tag. You can change the data store of the tag either using Historian Administrator or using Excel Tag Import. The new incoming data gets collected in the Motor data store. If you do a raw data query, you will get only the latest data and the previous data will not be available. To get the old data, you must migrate the data residing in the User
data store to the Motor
data store.
To migrate a tag and its data from one data store to another data store on the same server:
Merging a Historian Server
If your system architecture has evolved from multiple smaller servers into fewer large archives, you can eliminate the smaller machines while preserving all your tag configuration and collected data.
Consider the following example. You have two machines, Machine A and Machine B. Machine A is running current or any earlier version of Historian and has 100 tags and 10 archive files. The data of these tags are collected from the collector and is being queried by users. Machine B is running the current version of Historian.
- This example does not include Alarm migration. If Machine A was being used to store alarms, then you need to migrate those before eliminating Machine A.
- You cannot migrate tags with Enumerated Data Sets. If you want to migrate data for Enumerated Data Sets, then you must create the Enumerated Data Sets in Historian Administrator or Microsoft Excel and then migrate the tags.
- To migrate tags which are condition based triggers, then you must create the condition-based triggers for that tag in Historian Administrator or Microsoft Excel and then migrate the tags.
You can migrate data only if the file format of the archive files format is .IHA. If the back-up archive is in .zip format, extract the zip files and copy all the .IHA files separately in a folder.
Migration Tool Command-Line Syntax
Command Syntax
- For 32-bit:
MigrateIHA.exe "<IHA file name with full path>" "<IHC filename with full path>"
- For 64-bit:
MigrateIHA_x64.exe "<IHA file name with full path>" "<IHC filename with full path>"
Command-line Options
Option | Description |
---|---|
/NOTHROTTLE |
This does not throttle any part of the migration process, but may impact resources on the server. Optionally, you can remove this switch as required. By default, throttling is rated at 5000 events per second. |
/NOMESSAGES |
This does not migrate messages into the newly created archive. Using this switch may or may not reduce the size of your archives, depending on the number of messages stored in the archive. By default, messages are migrated if this switch is not used. |
/EXISTINGTAGS |
This will migrate data for only those tags that exist in the destination archiver. |
/b |
This option of the start.exe file allows the IHA Migration tool to start without opening a new window for each instance. If you are migrating a pre 4.5 IHA file you will need to have the IHC file for that IHA and specify the IHC file in the Options dialog or on the command line. Otherwise, you will get a warning message. |
/wait |
This option of the start.exe file allows each instance of the IHA Migration tool to complete the migration before starting the next migration in the sequence. |
/NOIHC |
This option skips verifying for IHC file and proceed with the migration. IHC file is not required, if batch command have /NOIHC option. |
Notes
-
If you are migrating from a command line, provide IHC file, else, use /NOIHC option to omit the IHC file.
-
If you do not have the IHC or you are not sure you have the correct IHC then you should use the pre-4.5 version of MigrateIHA to migrate the IHA. Otherwise, the data will not migrate correctly.
- You should keep a copy of the original IHA file.
- The IHC must contain all the tags that are in the IHA file, so use the most current IHC you have.
- You must use double quotes when you enter the IHA and IHC file even if you do not have spaces in your file path or file name.
- Migrating an IHA will upgrade it to 4.5 format.
- If you are migrating a 4.5 IHA you should provide the IHC file in the Options dialog but if you do not have the IHC you can safely continue past the warning message.
Creating a Batch File to Migrate Multiple IHA Files
cd c:\Program Files\Historian
start /b /wait migrateiha /NOTHROTTLE /NOMESSAGES
"c:\Historian Data\Backups\server_Archive001.iha"
"c:\Historian Data\Backups\server_Config.ihc".
Interoperability of Historian Versions
- Historian Collectors below v6.0 can write to Historian v7.0 Archivers; however, since the earlier collector versions cannot automatically connect to a mirror, users need to point those collectors to the mirror system.
- Historian Clients below v6.0 can retrieve data from Historian v7.0 Archivers.
- Historian v7.0 or later Clients can retrieve data from a single Historian Data Archiver below v6.0.
- Historian v7.0 or later Collectors can write to a single Historian Data Archiver below v6.0.
- An SDK program built on an Historian v7.0 or later node does not run on an Historian below v6.0.
- An SDK program that you created in Historian below v7.0 must be rebuilt on a computer with Historian v7.0 or later if you want to run it on that version.
- It is recommended that you use consistent versions of client and server applications. If you do use different client and server versions of the Historian, regularly back up all archives and tag configurations.