How to keep data when upgrading kibana docker?

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  >> What happens if I edit 7.9.1 to 7.10.2 and restart dockerfile? Lose all kibana data?
    container_name: kibana
    environment:
      - "ELASTICSEARCH_URL=http://elasticsearch:9200"
    depends_on:
      - elasticsearch
    ports:
      - "5601:5601"
    networks:
      - elastic

I want to keep "space list" and all "saved objects", but there is no export of space. In addition, "saved objects" under each space is different. How can I export all 'data' at one time?


Hi @wajika,

The saved objects are saved within the Elasticsearch cluster. It is important to bind data volumes for the Elasticsearch containers, and this seems to be done in your configuration. This should keep the data when you upgrade Kibana.

There isn't UI support to export the list of spaces or export all the saved objects across spaces. The best recommendation for upgrading Kibana can be found here: https://www.elastic.co/guide/en/kibana/current/upgrade.html.

Hi @mikecote thanks you for the reply.

I know that kibana data is saved in Elasticsearch, but the old version of kibana data in es, I use the new version of kibana to start, can it successfully read the old version of data?


There is one more important thing that I need to confirm. In visualize, the name of the source I import has a version number. If I update the elastic stack, including APM (to 7.10.2), will visualize update automatically?

You should upgrade Elasticsearch and Kibana, ideally with Elasticsearch being the first upgrade.
You can upgrade Kibana, but not all functionality in Elasticsearch may work.

Yes, I will upgrade elasticsearch first. But I found that some things don't update together, such as' visualize '.

I'm not sure what you mean by that.

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