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

**URL:** <https://discuss.elastic.co/t/where-user-roles-index-and-saved-objects-are-stored/301686>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [April 5, 2022, 11:21pm UTC](https://discuss.elastic.co/t/where-user-roles-index-and-saved-objects-are-stored/301686 "2022-04-05T23:21:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gabriel\_Mendez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gabriel_mendez/32/103999_2.png) [@Gabriel\_Mendez](https://discuss.elastic.co/u/Gabriel_Mendez)\
**Post date:** [April 5, 2022, 11:21pm UTC](https://discuss.elastic.co/t/where-user-roles-index-and-saved-objects-are-stored/301686/1 "2022-04-05T23:21:14Z")

</div>

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:

```auto
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!

---

<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:** [April 5, 2022, 11:31pm UTC](https://discuss.elastic.co/t/where-user-roles-index-and-saved-objects-are-stored/301686/2 "2022-04-05T23:31:02Z")

</div>

Welcome to our community! 😃  
Please don't use 6.X, it's years old and is [EOL](https://www.elastic.co/support/eol).

> [@Gabriel\_Mendez](#):
>
> `- "/efs/elasticsearch-data:/usr/share/elasticsearch/data"`

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](https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html#deb-layout). Try updating that and seeing if that fixes it.

---

<div class="post-metadata">

**Author:** ![Gabriel\_Mendez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gabriel_mendez/32/103999_2.png) [@Gabriel\_Mendez](https://discuss.elastic.co/u/Gabriel_Mendez)\
**Post date:** [April 6, 2022, 6:30pm UTC](https://discuss.elastic.co/t/where-user-roles-index-and-saved-objects-are-stored/301686/3 "2022-04-06T18:30:47Z")

</div>

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](https://us1.discourse-cdn.com/elastic/original/3X/9/f/9fa9368b6dcc2791e42a6523e443826081ec64e3.png)

---

<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:** [May 4, 2022, 6:31pm UTC](https://discuss.elastic.co/t/where-user-roles-index-and-saved-objects-are-stored/301686/4 "2022-05-04T18:31:29Z")

</div>

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