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

**URL:** https://discuss.elastic.co/t/how-to-upgrade-elasticsearch-cluster-from-7-9-to-8-13-without-data-loss/356606
**Category:** Elasticsearch
**Created:** [April 2, 2024, 11:00am UTC](https://discuss.elastic.co/t/how-to-upgrade-elasticsearch-cluster-from-7-9-to-8-13-without-data-loss/356606 "2024-04-02T11:00:59Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Krishna\_Sailesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krishna_sailesh/32/110056_2.png) [@Krishna\_Sailesh](https://discuss.elastic.co/u/Krishna_Sailesh)
#### Post date: [April 2, 2024, 11:00am UTC](https://discuss.elastic.co/t/how-to-upgrade-elasticsearch-cluster-from-7-9-to-8-13-without-data-loss/356606/1 "2024-04-02T11:00:59Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [April 2, 2024, 11:07am UTC](https://discuss.elastic.co/t/how-to-upgrade-elasticsearch-cluster-from-7-9-to-8-13-without-data-loss/356606/2 "2024-04-02T11:07:42Z")

</div>

Have you looked at [the upgeade documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/setup-upgrade.html)?

---

<div class="post-metadata">

### Author: ![Krishna\_Sailesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krishna_sailesh/32/110056_2.png) [@Krishna\_Sailesh](https://discuss.elastic.co/u/Krishna_Sailesh)
#### Post date: [April 2, 2024, 11:58am UTC](https://discuss.elastic.co/t/how-to-upgrade-elasticsearch-cluster-from-7-9-to-8-13-without-data-loss/356606/3 "2024-04-02T11:58:29Z")

</div>

@Christian_Dahlqvist

I have gone through [Upgrade Elasticsearch | Elastic Installation and Upgrade Guide [8.13] | Elastic](https://www.elastic.co/guide/en/elastic-stack/8.13/upgrading-elasticsearch.html)

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

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [April 2, 2024, 12:24pm UTC](https://discuss.elastic.co/t/how-to-upgrade-elasticsearch-cluster-from-7-9-to-8-13-without-data-loss/356606/4 "2024-04-02T12:24:51Z")

</div>

> [@Krishna\_Sailesh](#):
>
> Does the data copy from var/lib/elasticsearch/nodes/0 to var/lib/elasticsearch/work?

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.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [April 30, 2024, 12:25pm UTC](https://discuss.elastic.co/t/how-to-upgrade-elasticsearch-cluster-from-7-9-to-8-13-without-data-loss/356606/5 "2024-04-30T12:25:11Z")

</div>

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