# Changing directory for path.data and path.logs

**URL:** <https://discuss.elastic.co/t/changing-directory-for-path-data-and-path-logs/83773>\
**Category:** Elasticsearch\
**Created:** [April 26, 2017, 9:17pm UTC](https://discuss.elastic.co/t/changing-directory-for-path-data-and-path-logs/83773 "2017-04-26T21:17:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![glturle](https://avatars.discourse-cdn.com/v4/letter/g/5f8ce5/32.png) [@glturle](https://discuss.elastic.co/u/glturle)\
**Post date:** [April 26, 2017, 9:17pm UTC](https://discuss.elastic.co/t/changing-directory-for-path-data-and-path-logs/83773/1 "2017-04-26T21:17:36Z")

</div>

I just installed the Elasticsearch on windows 2012 server and want to change the directory paths for path.data and path.logs per best practices. App info:

--Current location  
E:\apps\elasticsearch-5.3.0  
E:\apps\elasticsearch-5.3.0\data  
E:\apps\elasticsearch-5.3.0\logs

I stopped the apps (Elasticsearch, Kibana and Logstash) and updated the elasticsearch.yml file to this:

#path.data: E:\data\elasticsearch  
#path.logs: E:\logs\elasticsearch

When I restart the services it still shows paths:

"data": [  
{  
"path": """ **E:\apps\elasticsearch-5.3.0\data\nodes\0**""",  
"mount": "Local Disk (E:)",  
"type": "NTFS",  
"total\_in\_bytes": 107371032576,  
"free\_in\_bytes": 105539002368,  
"available\_in\_bytes": 105539002368  
}

"path": {  
"logs": """ **E:\apps\elasticsearch-5.3.0\logs**""",  
"home": """E:\apps\elasticsearch-5.3.0"""  
},

Do I need to update somewhere else also?

Also noticed in file elasticsearch-service.bat that these paths are set:

if "%LOG\_DIR%" == "" set LOG\_DIR=%ES\_HOME%\logs  
if "%DATA\_DIR%" == "" set DATA\_DIR=%ES\_HOME%\data

Do I need to update these?

---

<div class="post-metadata">

**Author:** ![msimos](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@msimos](https://discuss.elastic.co/u/msimos)\
**Post date:** [April 27, 2017, 12:22am UTC](https://discuss.elastic.co/t/changing-directory-for-path-data-and-path-logs/83773/2 "2017-04-27T00:22:35Z")

</div>

Hi,

If you run elasticsearch-service.bat manager in the bin directoryko and click on Java do you have a path set there?

[https://www.elastic.co/guide/en/elasticsearch/reference/current/windows.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/windows.html)

![](https://www.elastic.co/guide/en/elasticsearch/reference/current/images/service-manager-win.png)

---

<div class="post-metadata">

**Author:** ![glturle](https://avatars.discourse-cdn.com/v4/letter/g/5f8ce5/32.png) [@glturle](https://discuss.elastic.co/u/glturle)\
**Post date:** [April 27, 2017, 7:59pm UTC](https://discuss.elastic.co/t/changing-directory-for-path-data-and-path-logs/83773/3 "2017-04-27T19:59:23Z")

</div>

Yes it is. I figured it out, the elasticsearch.yml was commented out. I made a backup and was looking at wrong file. Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 25, 2017, 8:13pm UTC](https://discuss.elastic.co/t/changing-directory-for-path-data-and-path-logs/83773/4 "2017-05-25T20:13:09Z")

</div>

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