User Tools

Site Tools


data_core:iphist_v3

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
data_core:iphist_v3 [2024/01/10 17:35] sudata_core:iphist_v3 [2024/04/23 16:25] su
Line 38: Line 38:
  
 When configuring an IP Hist v3 data source make sure to change the elastic URL setting to match the port number you specified in step 2. When configuring an IP Hist v3 data source make sure to change the elastic URL setting to match the port number you specified in step 2.
 +
 +
 +==== IP Hist Migration Tool ====
 +
 +The IP Hist migration tool allows you to migrate IP Hist data from an existing IP Hist v2 instance (Elastic 2.x) to an IP Hist v3 instance (Elastic 7.x).
 +
 +=== Setup ===
 +
 +You can download the migration tool here: [[http://downloads.intelligentplant.com/downloads/ip_hist_tool/ip_hist_tool_v0.1.0.zip]]
 +
 +  - Extract the zip file
 +  - Add the path to the ''ip_hist_tool'' folder to your PATH environment variable
 +  - Open a terminal and type ''ip_hist_tool --help'' to verify that the tool is working
 +
 +On windows:
 +  - Extract the contents of ''ip_hist_tool.zip'' to ''C:\''
 +  - Search for "environment variable" in the start menu search bar and click the "Edit the system enivironment variables" option
 +  - Click the button labeled "Environment Variables..."
 +  - In the dialogue that opens under "User variables for <username>" double click "Path"
 +  - The click "New"
 +  - Add a new entry ''C:\ip_hist_tool'' (the path to the folder containing ip_hist_tool.exe)
 +
 +=== Usage ===
 +
 +You can get help using the tool using the command:
 +
 +''ip_hist_tool --help'' or ''ip_hist_tool -h''
 +
 +The tool has several sub-commands. You can get additional help for a specific sub-command using:
 +
 +''ip_hist_tool <sub-command> -h''
 +
 +For example:
 +
 +''ip_hist_tool migrate -h''
 +
 +== List (ls) ==
 +
 +You can use the ''list'' or ''ls'' sub-command to list indices on an Elastic instance.
 +
 +For example:
 +
 +''ip_hist_tool ls localhost:9203''
 +
 +This command lists the indices on the local Elastic search 7.x (IP Hist v3/Elastic 7.x is assumed when no version is specified) instance running on port 9203. This is equivalent to:
 +
 +
 +''ip_hist_tool ls localhost:9203 -v 3''
 +
 +To list the inidces on an Elastic 2 instance use:
 +
 +''ip_hist_tool ls localhost:9200 -v 2''
 +
 +You can spefify a name filter using ''-f''
 +
 +''ip_hist_tool ls localhost:9200 -v 2 -f "*edge.iphistorian*"''
 +
 +== Delete (rm) ==
 +
 +You can delete indices using the ''delete'' or ''rm'' sub-commands.
 +
 +For example to delete all indices:
 +
 +''ip_hist_tool rm localhost:9203 *''
 +
 +For the delete sub-command a filter is always required. The command will print which indices and ask you to confirm before deleting since this operation is not reversible.
 +
 +== Migrate ==
 +
 +The ''migrate'' sub-command is used to migrate tag and data indices from an IP Hist v2 instance to v3. The source Elastic version must be 2.x and the destination 7.x.
 +
 +By default the migrate command will move the indices that match the naming convention of the default "Edge Historian" data source.
 +
 +For example the following command would migrate the "Edge Historian" data soruce from IP Hist v2 to v3:
 +
 +''ip_hist_tool migrate localhost:9200 localhost:9203''
 +
 +During migration a record of each data index that is succesfully migrated is recorded to a text file in the working directory. This allows the operation to be resumed if it is cancelled or fails during operation.
 +
 +To resume migration run the same command again, but add the ''--skip_tags'' parameter (otherwise the tag definitions index will be deleted and re-migrated).
 +
 +e.g. ''ip_hist_tool migrate localhost:9200 localhost:9203 --skip_tags''
 +
 +You will be prompted to delete any indices that exist in the target elastic index but were not completed before the operation was stopped (as the migration staus of these indices is unknown). If you agree migration will then resume.
 +
 +To migrate a data source other than the default Edge Historian you can specify the index names using the ''-t'' (tag index name), ''-d'' (data index name) and ''-a'' (annotation index name) parameters.
 +
 +The value of ''-t'' should be the value of the "Tag Definitions Index Name" setting in the data source settings.
 +The value of ''-d'' should be the value of the "Data Index Name Prefix" setting in the data source settings.
 +The value of ''-a'' should be the value of the "Data Index Name Prefix" setting plus an ''annotations'' suffix. e.g. "edge.iphistorianannotations"
 +
 +For example if you were migrating a data source called "Example" the command would look something like this:
 +
 +''ip_hist_tool migrate localhost:9200 localhost:9203 -t exampletags -d example -a exampleannotations''
 +
data_core/iphist_v3.txt · Last modified: 2024/05/24 16:27 by su