# How to upgrade the elastic cluster deployed by docker?

**URL:** https://discuss.elastic.co/t/how-to-upgrade-the-elastic-cluster-deployed-by-docker/256986
**Category:** Elasticsearch
**Tags:** docker
**Created:** [November 29, 2020, 1:44pm UTC](https://discuss.elastic.co/t/how-to-upgrade-the-elastic-cluster-deployed-by-docker/256986 "2020-11-29T13:44:09Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![wajika](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@wajika](https://discuss.elastic.co/u/wajika)
#### Post date: [November 29, 2020, 1:44pm UTC](https://discuss.elastic.co/t/how-to-upgrade-the-elastic-cluster-deployed-by-docker/256986/1 "2020-11-29T13:44:09Z")

</div>

I started the elasticsearch cluster with docker-compose, and I wanted to upgrade from 7.9.1 to 7.10.0. There is already some data(Advanced Settings,Spaces,Saved Objects) on kibana. How to upgrade the cluster without losing data?

If I try to modify ' image: elasticsearch:7.9.1\>\> image: elasticsearch:7.10.0 '

Can elasticsearch continue to use the data generated in 7.9.1?

> ```
> version: '3.6'
> services:
> elasticsearch:
> image: elasticsearch:7.9.1
> container_name: elasticsearch-docker
> environment:
> - node.name=es-docker
> - cluster.name=es-single-node
> - discovery.type=single-node
> - bootstrap.memory_lock=false
> - "ES_JAVA_OPTS=-Xms2G -Xmx2G"
> ulimits:
> memlock:
> soft: -1
> hard: -1
> volumes:
> - /home/esdata/:/usr/share/elasticsearch/data
> ports:
> - 9200:9200
> - 9300:9300
> networks:
> - elastic
> kibana:
> image: kibana:7.9.1
> container_name: kibana
> environment:
> - "ELASTICSEARCH_URL=http://elasticsearch:9200"
> depends_on:
> - elasticsearch
> ports:
> - "5601:5601"
> networks:
> - elastic
> 
> ```

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [December 2, 2020, 1:05am UTC](https://discuss.elastic.co/t/how-to-upgrade-the-elastic-cluster-deployed-by-docker/256986/2 "2020-12-02T01:05:19Z")

</div>

> [@wajika](#):
>
> If I try to modify ' image: elasticsearch:7.9.1\>\> image: elasticsearch:7.10.0 '

That is the easiest way, yes.

---

<div class="post-metadata">

### Author: ![wajika](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@wajika](https://discuss.elastic.co/u/wajika)
#### Post date: [December 2, 2020, 2:56am UTC](https://discuss.elastic.co/t/how-to-upgrade-the-elastic-cluster-deployed-by-docker/256986/3 "2020-12-02T02:56:06Z")

</div>

Thank you, I know how to upgrade, but I'm not sure that there will be data loss or exception in this operation?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [December 2, 2020, 3:29am UTC](https://discuss.elastic.co/t/how-to-upgrade-the-elastic-cluster-deployed-by-docker/256986/4 "2020-12-02T03:29:17Z")

</div>

There shouldn't be as you are using persistent volumes.

If in doubt, always backup first.

---

<div class="post-metadata">

### Author: ![wajika](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@wajika](https://discuss.elastic.co/u/wajika)
#### Post date: [December 2, 2020, 6:20am UTC](https://discuss.elastic.co/t/how-to-upgrade-the-elastic-cluster-deployed-by-docker/256986/5 "2020-12-02T06:20:49Z")

</div>

According to my docker-compose.yaml file, I only need to backup the data of es?

As far as I know, some information (cluster.id, cluster election ID...) will be saved when kibana is started. I have tried to upgrade (6.X\> 7.X) in a binary deployment cluster, and there have been many errors, but I It is operated in accordance with the document.

So I want to get more suggestions for this upgrade.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [December 2, 2020, 6:21am UTC](https://discuss.elastic.co/t/how-to-upgrade-the-elastic-cluster-deployed-by-docker/256986/6 "2020-12-02T06:21:57Z")

</div>

6\>7 is not as simple due to major version changes.  
Minor upgrades are a lot easier.

---

<div class="post-metadata">

### Author: ![wajika](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@wajika](https://discuss.elastic.co/u/wajika)
#### Post date: [December 2, 2020, 6:23am UTC](https://discuss.elastic.co/t/how-to-upgrade-the-elastic-cluster-deployed-by-docker/256986/7 "2020-12-02T06:23:55Z")

</div>

But I want to know what bad effects this upgrade will have.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [December 2, 2020, 6:41am UTC](https://discuss.elastic.co/t/how-to-upgrade-the-elastic-cluster-deployed-by-docker/256986/8 "2020-12-02T06:41:19Z")

</div>

If you've read the upgrade documentation and release notes, take a backup, and follow the upgrade process, then you should be fine.

---

<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: [December 30, 2020, 6:41am UTC](https://discuss.elastic.co/t/how-to-upgrade-the-elastic-cluster-deployed-by-docker/256986/9 "2020-12-30T06:41:22Z")

</div>

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