Migrating a Tag and its Data
About this task
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:
Procedure
- Use
iharchivebackup -c
to make a backup of the .ihc file.The backup of the Config file is automatically created in the Archives folder. - In Historian Administrator, back up each archive from oldest to newest.
- Launch the Migration Tool (MigrateIHA.exe for 32-bit or MigrateIHA_x64.exe for 64-bit) using Administrator privileges.
- Select .
- In the Server pane, enter the Server name.
- 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.
- 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.
- In the Time to Migrate pane, ensure the Use IHA TimeFrame option is selected.
- Select .
- 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.
What to do next
DataIsReadOnlyAfter
field on the
Security section of the Data Store
Maintenance page of Historian Administrator (or the ActiveHours
property) so that the value is large enough to
contain the calculated data. By default, this value is 1 month.