How to properly upgrade ElasticSearch running as docker containers

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.

1 Like

The Elasticsearch-centric docs for upgrades are here. 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 says:

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

Please do this!

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.

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