Path.data changing the data path from one place to other


(Chandra Reddy Kosna) #1

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 path.data will suffice or do i need to do any other steps so that my cluster will show all the data containing in previous location


(Bernt Rostad) #2

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 path.data setting from elasticsearch.yml.

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

  1. Change path.data 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.


(system) #3

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