Migrating Elasticsearch data from Open Distro to OpenSearch
Before you begin
- Make sure you have performed all the steps listed in the Preparing for upgrade topic.
- Make sure you run the Upgrade configuration utility.
To migrate Elasticsearch data from Open Distro to OpenSearch
- Go to helix-on-prem-deployment-manager/utilities/migration
Run the following script to migrate Elasticsearch data from Open Distro to OpenSearch:
./es-opensearch-migration.sh migrateIf 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.- Kibana service may fail to start, causing upgrade failures. To prevent this issue, perform the following steps to delete indices that could cause problems:
To search for the log management service pod, run the following command:
kubectl get po | grep log-mgmTo log into the pod, run the following command:
kubectl exec -it <log-mgmt-service-POD> -- bashReplace <log-mgmt-service-POD> with the log management service pod name.
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> -kReplace <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: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> -kReplace <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 |