How to upgrade the elastic cluster deployed by docker?

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

That is the easiest way, yes.

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

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

If in doubt, always backup first.

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.

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

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

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

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