Migrating Historian Data

Important: You do not have the latest version of Historian! You are missing out on the newest capabilities and enhanced security. For information on all the latest features, see the Historian product page. For more information on upgrades, contact your GE Digital sales agent or e-mail GE Digital Sales Support. For the most up-to-date documentation, go here.

Migrating the Alarms and Events Database from 4.5 to 7.0

Before migrating alarm and event data, ensure that you have backed up the data.
If you are upgrading to Historian 7.0 and you have already collected alarms, you can migrate the Historical Alarm and Event data after upgrading to Historian 7.0. Alarms are not available for retrieval until they are migrated. New alarms collected will be available immediately.

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 launch Proficy.Historian.AandE.Migration.exe.

Backing Up Alarm and Event Data

To back up the Alarm and Event data:
  1. Click the Backup Existing Alarms and Events tab.
  2. In the Time Range section, in the From and To fields, set the start time and end time.
    You may need to migrate small time periods if you have many alarms. If you need to migrate the alarms in blocks of time, do the oldest alarms first.
  3. In the Database Name field, enter the name of the database you are backing up.
    Typically, this will be the same as the SQL Server you are currently using.
  4. Select either Use Windows Authentication or Use SQL Authentication.
  5. In the User Id and Password fields, enter the login credentials. Be sure to use a user name with permission to connect and backup alarms.
  6. In Backup Folder Path field, give the absolute path, including file name, to store the backed up alarms. For example, c:\temp\March2010.bak. Provide the path to place the backup folder on the local computer, and if your SQL server is running on a remote computer, enter a path that exists on the remote computer.
  7. Click Test Connection to check if the source database is active and the information is accurate.
    The Begin Backup button is activated.
  8. Click Begin Backup.
    When the backup is complete, a count of rows backed up is displayed.

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.

Note:
  • 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

You need to run this tool as an administrator to migrate and create the log files in the C:\ directory.

To migrate historical data stored in IHA files from any version of Historian:

  1. In the Historian 7.1 folder, double-click the Migration Tool executable (MigrateIHA.exe for 32-bit or MigrateIHA_x64.exe for 64-bit) to open the IHA Migration Utility.
    The icon for the executable looks as follows: .
  2. Select Configure Options from the Options menu.
  3. Enter or modify any specific configuration information.
    When choosing an IHC file, do not specify one currently in use by the Data Archiver. (For more information, see Configuring Migration Options.)
  4. Select File > Migrate Historical Data .
    The Select Historical Data File(s) dialog box appears.
  5. Select a historical file and click Open.
    Refer to the IHA Migration Utility main screen for information on the progress of the migration and any encountered errors.
    Note:

    The IHA Migration Utility screen only displays the most recent lines of the log file. For the full set of logged messages, refer to the log file, typically located in C:\IHAMigration.Log.

  6. Optionally, perform these steps:
    1. You can upgrade the older version's archive files to the latest version by selecting the bulk upgrade option.
      Stop the Data Archiver service and select File > Bulk Upgrade Historical Data.

      If you do a bulk upgrade of historical data immediately after you install the latest version on Historian, then save on upgrading while the system reboots.

    2. To clear the log messages displayed in the screen, select File > Clear Display.
    3. To view the logs saved in the IHAMigration.log file, select File > View Log File > ..

Configuring Migration Options

  1. In the Migration tool (MigrateIHA.exe for 32 bit or MigrateIHA_x64.exe for 64-bit)., select Options > Configure Options.
    The Migration Options dialog box appears showing the default server information and the default migration options.


  2. Enter options the following 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

If you want to separate a single large user data store of tag into multiple smaller data stores on the same machine, and if your software license allows it, then you should assign the tag to the new data store and then migrate the 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:

  1. Use iharchivebackup -c to make a backup of the .ihc file.
    The backup of the Config file is automatically created in the Archives folder.
  2. In the Historian Administrator, back up each archive from oldest to newest.
  3. Launch the Migration Tool (MigrateIHA.exe for 32-bit or MigrateIHA_x64.exe for 64-bit) using Administrator privileges.
  4. Select Options > Configure Options.
  5. In the Server pane, enter the Server name.
  6. In the Options pane, enter the IHC File path in the Config File path field, using the browse button. This is the path to the IHC backup that you made in step 1.
  7. In the Tags to Migrate pane, select the Migrate Using Tag Mask option and enter the Tag Name you moved to the new data store.
  8. In the Time to Migrate pane, ensure the Use IHA TimeFrame option is selected.
  9. Select File > Migrate Historical Data.
  10. Select the archive file that you backed up in Step 2 and monitor the progress of the migration. When the migration is complete, query the data to see the migrated data can be queried. Repeat with the remaining archives from oldest to newest.

Merging a Historian Server

A typical scenario is to merge a Historian Server into an existing data store on another machine.

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.

Note:
  • 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.

  1. Before migrating, copy the .IHC and all the .IHA files from Machine A to Machine B.
  2. Launch the Migration Tool (MigrateIHA.exe for 32-bit or MigrateIHA_x64.exe for 64-bit) with Administrator privileges.
  3. Select Options > Configure Options.
  4. In the Server pane, enter the Server name.
  5. In the Tags to Migrate pane, ensure that the Migrate All Tags option is selected
  6. In the Options pane, enter the IHC File path in the Config File path field, using the browse button. he path you enter is the path to the .IHC file brought over from Machine A.
  7. In the Time to Migrate pane, ensure the Use IHA TimeFrame option is selected.
  8. Ensure Throttle Output is selected.
  9. To migrate the data, select File > Migrate Historical Data and select the archive file that has the oldest data.
    The tags and data are migrated to the default data store in time slices. The MigrateIHA window displays the progress and any Tag Add or Data Add errors are displayed in the log file. You can estimate the remaining time by watching the progress.
  10. Repeat the previous steps for each of the remaining archives, from oldest to newest data.
  11. Add the collector to the Historian Server on Machine B.
    See the Adding a Data Collector to an Historian Server topic in Data Collectors - General ebook

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

The IHA Migration utility migrates only one archive at a time by design. However, if you need to add more than one archive at a time, you can create a batch file to automate multiple archive merges.
When creating a batch file you need to provide the batch file with a logical name and save the batch (.bat) file in a location that can be easily accessed using the command prompt.
Note: When migrating any archive, you should start with the archive with the oldest data first, followed by newer data, in sequence, to minimize the amount of disk space used in the Data Archiver.
For example:
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

Interoperability guidelines for Historian versions include:
  • 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.
Note: To determine the version of the server, client, and SDK, click the About link in the Historian Administrator. The version of the Historian installer can be seen in the Control Panel / Uninstall programs; this version is different from the Historian core version seen in the Historian Administrator About link.