Data not found when volume mounted

For elasticsearch to persist data i mounted volume to my container. below is the run command i am using.

docker run -d --name elasticsearch --network=elastic -v esdata1:/usr/share/elasticsearch/data -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node"

In the host machine i could not find any files at /usr/share/elasticsearch/data I want to get data and use for different host machine. so where to find the data

The directory on your host machine is named esdata1.

1 Like

now i am mounting volume to /usr/share/elasticsearch/data
docker run -d --name elasticsearch --network=elastic -v /usr/share/elasticsearch/data:/usr/share/elasticsearch/data -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node"

but i see only nodes directory created which is empty. i want to persist all kibana settings and visualizations and also elasticsearch data. how can i do that

@DavidTurner can you please suggest

No idea, sorry, I don't know how Elasticsearch could be creating a nodes directory and not putting anything inside it.

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