How to upgrade elasticsearch cluster from 7.9 to 8.13 without data loss

Hi

I am running Elasticsearch with a 3-node cluster with 7.9.2 version which contains some huge data. I need to upgrade it to 8.10.3 without the data loss.
can someone help me with how to do it?

Thanks
Krishna

Have you looked at the upgeade documentation?

@Christian_Dahlqvist

I have gone through Upgrade Elasticsearch | Elastic Installation and Upgrade Guide [8.13] | Elastic

in the above docs 5.c there is a point where we need to copy and paste the data. in the folder specified in "path.data "in general it is var/lib/elasticsearch

observed that data of elasticsearch 7.* cluster is stored var/lib/elasticsearch/nodes/0

but in elasticearch 8.* cluster it is stored in var/lib/elasticsearch/

Does the data copy from var/lib/elasticsearch/nodes/0 to var/lib/elasticsearch/work?

Thanks
Krishna

How did you install your Elasticsearch? You do not need to copy data from any directory, you just need to make sure that the configuration is pointing to the correct data directory.

The path.data is /var/lib/elasticsearch in both cases, then elasticsearch will create the nodes directory inside the path.data

If you installed using rpm or deb you just need to updagred the package.

Also, keep in mind that you cannot upgraded directly from 7.9 to 8.10, you need to upgrade first to the latest patch of 7.17, check the upgrade assistant and then upgrade to 8, also, I would not upgrade to 8.10 since there are already 3 new releases after that.

2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.