changing the data path from one place to other

Hello I have a three node cluster where all the nodes are writing to X folder as of now in there individual servers and now i want to move the path to be written to some other path per say "Y" .What are the steps do i need to follow. Just changing the will suffice or do i need to do any other steps so that my cluster will show all the data containing in previous location

In order to change the data path on your Elasticsearch nodes you will have to stop and start each node, both because you must prevent Elasticsearch from writing to the data directory while you move it but also because Elasticsearch will have to load the new setting from elasticsearch.yml.

I've done this operation a couple of times and the steps I usually follow are:

  1. Change in the elasticsearch.yml file on the node.
  2. Stop Elasticsearch on the node.
  3. Rename the node's data directory (e.g. mv -v /some/path/X /some/path/Y).
  4. Start up Elasticsearch again.

Important note: If your cluster is being indexed to you will have to wait for it to become green after a node restarts before stopping the next node or else you risk losing data.

1 Like

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