Skip to main content

Moving Elasticsearch data and logs

How to move the Elasticsearch data and log directories to a different drive volume on Windows.

  1. 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=true

    Note the path entries for data, logs, and config. The defaults are:

    C:\ProgramData\Elastic\Elasticsearch\data
    C:\ProgramData\Elastic\Elasticsearch\logs
    C:\ProgramData\Elastic\Elasticsearch\config
  2. On the new target volume, create a directory called Elasticsearch.

  3. Stop these Windows services:

    • Entrinsik Informer5
    • Elasticsearch
  4. Move the data and logs folders from the original location to the new Elasticsearch directory, so it contains:

    \Elasticsearch\data
    \Elasticsearch\logs
  5. Edit elasticsearch.yml in the config directory from step 1, updating the data and logs paths to the new location, then save:

    path.data: <new volume>\Elasticsearch\data
    path.logs: <new volume>\Elasticsearch\logs
  6. Restart the Windows services in this order:

    1. Elasticsearch
    2. 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.