# How to properly upgrade ElasticSearch running as docker containers

**URL:** <https://discuss.elastic.co/t/how-to-properly-upgrade-elasticsearch-running-as-docker-containers/221711>\
**Category:** Elasticsearch\
**Created:** [March 2, 2020, 3:17pm UTC](https://discuss.elastic.co/t/how-to-properly-upgrade-elasticsearch-running-as-docker-containers/221711 "2020-03-02T15:17:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![LiangZugeng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/liangzugeng/32/63849_2.png) [@LiangZugeng](https://discuss.elastic.co/u/LiangZugeng)\
**Post date:** [March 2, 2020, 3:17pm UTC](https://discuss.elastic.co/t/how-to-properly-upgrade-elasticsearch-running-as-docker-containers/221711/1 "2020-03-02T15:17:56Z")

</div>

We are new to ElasticSearch and are running ES 7.5.0 in our production as docker containers with an external volume holding ES data, now ES 7.6.0 is out and we wanted to upgrade our ES containers to 7.6.0, what is the supported way to upgrade the ES without losing or damaging the existing indices data?

Should it be just fine to modify the docker-compose.yml and upgrade the ES version to 7.6.0 and re-run it? How ES 7.6.0 will handle the indices data 7.5.0 created if there was any schema (or something like that) changed? Or do we need to re-generate all indices after the upgrade?

I googled but seemed out of luck finding answers, the current ES 7.5.0 is in production now so we need to make sure the safety and integrity of the existing data before we can perform the upgrade, re-generating all 10GB indices data will take some time so that's not the preferred way.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [March 2, 2020, 4:07pm UTC](https://discuss.elastic.co/t/how-to-properly-upgrade-elasticsearch-running-as-docker-containers/221711/2 "2020-03-02T16:07:04Z")

</div>

The Elasticsearch-centric docs for upgrades are [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-upgrade.html#setup-upgrade). You can indeed start a 7.6.0 node on top of data from a 7.5.0 node and let Elasticsearch handle the upgrade automatically, so there's no need to regenerate anything or worry about schema changes.

Unfortunately I don't know how to translate this into the changes you need for your `docker-compose.yml`, but note that the section on [preparing to upgrade](https://www.elastic.co/guide/en/elasticsearch/reference/current/rolling-upgrades.html#_preparing_to_upgrade) says:

> 1. Test the upgrade in an isolated environment before upgrading your production cluster.

Please do this!

---

<div class="post-metadata">

**Author:** ![LiangZugeng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/liangzugeng/32/63849_2.png) [@LiangZugeng](https://discuss.elastic.co/u/LiangZugeng)\
**Post date:** [March 5, 2020, 2:30am UTC](https://discuss.elastic.co/t/how-to-properly-upgrade-elasticsearch-running-as-docker-containers/221711/3 "2020-03-05T02:30:23Z")

</div>

Thank you David, we will test the upgrade in an isolated environment as the document suggested, it’s good to know Elastic Search will handle the data upgrade automatically.

---

<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 2, 2020, 2:30am UTC](https://discuss.elastic.co/t/how-to-properly-upgrade-elasticsearch-running-as-docker-containers/221711/4 "2020-04-02T02:30:25Z")

</div>

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