Migrating Elasticsearch data from Open Distro to OpenSearch


We support OpenSearch instead of Open Distro. To migrate your Elasticsearch data from Open Distro to OpenSearch, you must run the Open Distro to OpenSearch migration utility.

Important

Perform the migration only if you are upgrading to BMC Helix IT Operations Management (BMC Helix ITOM) version 24.2 from version 23.4. 




Before you begin

Important

During the migration process, two instances of Elasticsearch (Open Distro and OpenSearch) will be running along with multiple other pods. For the migration to be successful, you must provision additional processor, memory, and disk space.

For more information about the resources required for the migration, see Sizing-and-scalability-considerations.
You can reclaim the resources after the upgrade.

To migrate Elasticsearch data from Open Distro to OpenSearch


  1. Go to helix-on-prem-deployment-manager/utilities/migration
  2. Run the following script to migrate Elasticsearch data from Open Distro to OpenSearch:

    ./es-opensearch-migration.sh migrate

    If you have enabled disaster recovery, you will be prompted to disable it. Type y to continue.
    You will get the following message after the migration is complete:
    Completed the migration from OpenDistro ES to Open Search Elastic Cluster.

  3. Kibana service may fail to start, causing upgrade failures. To prevent this issue, perform the following steps to delete indices that could cause problems:
    1. To search for the log management service pod, run the following command:

      kubectl get po | grep log-mgm
    2. To log into the pod, run the following command:

      kubectl exec -it <log-mgmt-service-POD> -- bash

      Replace <log-mgmt-service-POD> with the log management service pod name.

    3. To locate the indices, run the following command:

      curl --location --request GET "https://opensearch-logs-data:9200/_cat/indices/?v&s=index" -u <LOG_ELASTICSEARCH_USERNAME>:<LOG_ELASTICSEARCH_PASSWORD> -k

      Replace <LOG_ELASTICSEARCH_USERNAME> and <LOG_ELASTICSEARCH_PASSWORD> with the log Elasticsearch username and password.
      You will find the Elasticsearch username and password in the logelasticsearchsecret secrets file.

      Sample output:
      24.1_kibana-proxy-service.png

    4. Only if you find the indices between .kibana_1 to .kibana_9, run the following command to delete the indices:

      curl -XDELETE https://opensearch-logs-data:9200/.kibana_<index number> -u <LOG_ELASTICSEARCH_USERNAME>:<LOG_ELASTICSEARCH_PASSWORD> -k

      Replace <index number> with the Kibana index number that you want to delete.
      For example:

      curl -XDELETE https://opensearch-logs-data:9200/.kibana_1 -u <LOG_ELASTICSEARCH_USERNAME>:<LOG_ELASTICSEARCH_PASSWORD> -k



Where to go from here

Back to process

Complete the other prerequisite tasks listed on the Preparing-for-upgrade page.

Next task

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*