Where User/Roles, Index and Saved objects are stored?

Hello!,

I am using a docker version for Elasticsearch and Kibana, and I have deployed an AWS instance to have my App working, Now on every documentation for Elastic and Kibana with docker it says that to backup the data on a volume you just need to do it for the folder /usr/share/Elasticsearch/data.

However when I restart my instance all Kibana objects, indexes, users and roles are always deleted.

Can somebody help me find out what am I doing wrong? or where are those objects stored?

here is the docker-compose I am using:

services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.8.18
    container_name: elasticsearch
    environment:
      - ELASTIC_PASSWORD=${ELASTICSEARCH_PASSWORD}
    env_file:
      - .env
    volumes:
      - "./elasticsearch-config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml"
      - "./elasticsearch-config/elastic-certificates.p12:/usr/share/elasticsearch/config/elastic-certificates.p12"
      - "/efs/elasticsearch-data:/usr/share/elasticsearch/data"
      - "${EB_LOG_BASE_DIR}/elasticsearch:/app/logs/"
    restart: always
    ulimits:
      nproc: 4096
      nofile: 262144
    mem_limit: 4g
    ports:
      - 9200:9200

  kibana:
    image: docker.elastic.co/kibana/kibana:6.8.18
    container_name: kibana
    env_file:
      - .env
    volumes:
      - "./elasticsearch-config/kibana.yml:/usr/share/kibana/config/kibana.yml"
      - "${EB_LOG_BASE_DIR}/kibana:/app/logs/"
    restart: always
    depends_on:
      - elasticsearch
    ports:
      - 5601:5601

Thanks in advance for any help you can provide!

Welcome to our community! :smiley:
Please don't use 6.X, it's years old and is EOL.

I think you are expecting Elasticsearch data to live there, but it lives in /var/lib/elasticsearch by default, as per Install Elasticsearch with Debian Package | Elasticsearch Guide [8.11] | Elastic. Try updating that and seeing if that fixes it.

Thanks for your reply, I will try to upgrade the Elasticsearch version ASAP, however for now this is the one I have working on Production environment, and I am guessing it is not a simple upgrade from 6.8.x (EOL on 2022-02-10) to 8.1, I have to check if I can save my dashboards and visualizations and restore them on the new version.

Regarding your recommendation, I checked the Elasticsearch docker container, there is no Elasticsearch folder in the path you comment /var/lib/elasticsearch.

Attaching image.

ElasticSearchDocker

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