# Specify different path.data for different enviroments

**URL:** <https://discuss.elastic.co/t/specify-different-path-data-for-different-enviroments/219779>\
**Category:** Elasticsearch\
**Created:** [February 18, 2020, 12:20pm UTC](https://discuss.elastic.co/t/specify-different-path-data-for-different-enviroments/219779 "2020-02-18T12:20:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saravana37](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saravana37/32/85237_2.png) [@Saravana37](https://discuss.elastic.co/u/Saravana37)\
**Post date:** [February 18, 2020, 12:20pm UTC](https://discuss.elastic.co/t/specify-different-path-data-for-different-enviroments/219779/1 "2020-02-18T12:20:56Z")

</div>

Hello All ,

We are using same Elastic search instance for storing DEV,TEST and PROD data . My path.data and path.logs .

path.data: G:/DEV/Elastic\_Search\_Data  
path.logs: G:/DEV/Elastic\_Search\_logs

But i am trying to store the data into different paths according to the environment something like below.

if [fields][env] == "DEV" {  
path.data: G:/DEV/Elastic\_Search\_Data  
path.logs: G:/DEV/Elastic\_Search\_logs  
}  
else if [fields][env] == "TEST" {  
path.data: G:/TEST/Elastic\_Search\_Data  
path.logs: G:/TEST/Elastic\_Search\_logs  
}  
else if [fields][env] == "PROD" {  
path.data: G:/PROD/Elastic\_Search\_Data  
path.logs: G:/PROD/Elastic\_Search\_logs  
}  
else  
{  
path.data: G:/SRVRMGR/Elastic\_Search\_Data  
path.logs: G:/SRVRMGR/Elastic\_Search\_logs  
}

But it is not working. Can you please let me know how we can achieve this ?

Thanks and regards  
Saravana S

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 18, 2020, 12:44pm UTC](https://discuss.elastic.co/t/specify-different-path-data-for-different-enviroments/219779/2 "2020-02-18T12:44:47Z")

</div>

> [@Saravana37](#):
>
> We are using same Elastic search instance for storing DEV,TEST and PROD data .

You should not do that and have separate clusters.

> But i am trying to store the data into different paths according to the environment something like below.

You can't do that. You can start multiple instances and each one will use its own dirs but the same instance can't do that.

---

<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:** [March 17, 2020, 12:46pm UTC](https://discuss.elastic.co/t/specify-different-path-data-for-different-enviroments/219779/3 "2020-03-17T12:46:39Z")

</div>

Closed on March 17, 2020, 12:46pm UTC

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