# Two data folder present

**URL:** https://discuss.elastic.co/t/two-data-folder-present/325834
**Category:** Elasticsearch
**Created:** [February 17, 2023, 11:12am UTC](https://discuss.elastic.co/t/two-data-folder-present/325834 "2023-02-17T11:12:33Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![dev\_sab](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@dev\_sab](https://discuss.elastic.co/u/dev_sab)
#### Post date: [February 17, 2023, 11:12am UTC](https://discuss.elastic.co/t/two-data-folder-present/325834/1 "2023-02-17T11:12:33Z")

</div>

Hello All,

I am having the scenario two data folder present. I have accidently changed the path.data in elasticsearch.yml file. So, Two data folder present, one with old data and another with new data.

I need to merge into one data folder. Since, I am new to elasticsearch, any help would be appreciated.

Thanks,  
Sabari.

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [February 17, 2023, 12:21pm UTC](https://discuss.elastic.co/t/two-data-folder-present/325834/2 "2023-02-17T12:21:02Z")

</div>

> [@dev\_sab](#):
>
> I need to merge into one data folder. Since, I am new to elasticsearch, any help would be appreciated.

This is not possible, when you changed the data folder you basically recreated the node, you can't manually move files in the elasticsearch data folder.

The best option is to start your elasticsearch with the configuration using one of the data folders, take a snapshot of the data, stop the elasticsearch, and start it again with the data folder that you want to use, configure the snapshot repository and restore it.

---

<div class="post-metadata">

### Author: ![dev\_sab](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@dev\_sab](https://discuss.elastic.co/u/dev_sab)
#### Post date: [February 20, 2023, 8:59am UTC](https://discuss.elastic.co/t/two-data-folder-present/325834/3 "2023-02-20T08:59:00Z")

</div>

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: [March 20, 2023, 8:59am UTC](https://discuss.elastic.co/t/two-data-folder-present/325834/4 "2023-03-20T08:59:48Z")

</div>

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