Moving Elasticsearch data and logs
How to move the Elasticsearch data and log directories to a different drive volume on Windows.
-
With Elasticsearch running, find the current data, logs, and config paths by opening this URL from the Informer server:
http://localhost:9200/_nodes/settings?pretty=trueNote the
pathentries fordata,logs, andconfig. The defaults are:C:\ProgramData\Elastic\Elasticsearch\dataC:\ProgramData\Elastic\Elasticsearch\logsC:\ProgramData\Elastic\Elasticsearch\config -
On the new target volume, create a directory called
Elasticsearch. -
Stop these Windows services:
- Entrinsik Informer5
- Elasticsearch
-
Move the
dataandlogsfolders from the original location to the newElasticsearchdirectory, so it contains:\Elasticsearch\data\Elasticsearch\logs -
Edit
elasticsearch.ymlin theconfigdirectory from step 1, updating the data and logs paths to the new location, then save:path.data: <new volume>\Elasticsearch\datapath.logs: <new volume>\Elasticsearch\logs -
Restart the Windows services in this order:
- Elasticsearch
- Entrinsik Informer5
To verify the move: sign in to Informer, run a Report from an existing Dataset, and refresh the Dataset. No errors means the move succeeded.