# Is Directory path for storing data needs to be created manually or does it get created during application restart automatically

**URL:** <https://discuss.elastic.co/t/is-directory-path-for-storing-data-needs-to-be-created-manually-or-does-it-get-created-during-application-restart-automatically/146460>\
**Category:** Elasticsearch\
**Created:** [August 29, 2018, 3:46am UTC](https://discuss.elastic.co/t/is-directory-path-for-storing-data-needs-to-be-created-manually-or-does-it-get-created-during-application-restart-automatically/146460 "2018-08-29T03:46:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sandipatmca](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@sandipatmca](https://discuss.elastic.co/u/sandipatmca)\
**Post date:** [August 29, 2018, 3:46am UTC](https://discuss.elastic.co/t/is-directory-path-for-storing-data-needs-to-be-created-manually-or-does-it-get-created-during-application-restart-automatically/146460/1 "2018-08-29T03:46:20Z")

</div>

I am setting path.data and path.log file as below in elasticsearch.yml file. Can someone please confirm if the directory "/opt/elasticsearch/data" and "/opt/elasticsearch/log" should pre-exists in that path Or it will be created by default once elasticsearch application will be started.

* * *

path.data: /opt/elasticsearch/data  
path.log: /opt/elasticsearch/log

* * *

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 29, 2018, 5:09am UTC](https://discuss.elastic.co/t/is-directory-path-for-storing-data-needs-to-be-created-manually-or-does-it-get-created-during-application-restart-automatically/146460/2 "2018-08-29T05:09:21Z")

</div>

You should create those.

---

<div class="post-metadata">

**Author:** ![sandipatmca](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@sandipatmca](https://discuss.elastic.co/u/sandipatmca)\
**Post date:** [August 29, 2018, 1:40pm UTC](https://discuss.elastic.co/t/is-directory-path-for-storing-data-needs-to-be-created-manually-or-does-it-get-created-during-application-restart-automatically/146460/3 "2018-08-29T13:40:15Z")

</div>

Thanks Warkolm.

---

<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:** [September 26, 2018, 1:40pm UTC](https://discuss.elastic.co/t/is-directory-path-for-storing-data-needs-to-be-created-manually-or-does-it-get-created-during-application-restart-automatically/146460/4 "2018-09-26T13:40:16Z")

</div>

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