# Accidentally deleted the \_state folder of the index

**URL:** <https://discuss.elastic.co/t/accidentally-deleted-the-state-folder-of-the-index/166873>\
**Category:** Elasticsearch\
**Created:** [February 3, 2019, 5:16pm UTC](https://discuss.elastic.co/t/accidentally-deleted-the-state-folder-of-the-index/166873 "2019-02-03T17:16:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shubhankar\_Sarda](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@Shubhankar\_Sarda](https://discuss.elastic.co/u/Shubhankar_Sarda)\
**Post date:** [February 3, 2019, 5:16pm UTC](https://discuss.elastic.co/t/accidentally-deleted-the-state-folder-of-the-index/166873/1 "2019-02-03T17:16:25Z")

</div>

During an upgrade process I accidentally deleted the \_state folder of an index.  
Now it shows the following error on starting elasticsearch  
`[2019-02-03T17:06:13,247][WARN][o.e.c.u.IndexFolderUpgrader] [/var/lib/elasticsearch/data/nodes/0/indices/FJm8c84mQ6uIsPSzIZpr9A] no index state found - ignoring`

What can i do to fix this issue?  
Need urgent help

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [February 3, 2019, 7:38pm UTC](https://discuss.elastic.co/t/accidentally-deleted-the-state-folder-of-the-index/166873/2 "2019-02-03T19:38:45Z")

</div>

Can you describe your cluster in more detail? How many nodes? Do you have dedicated masters? What version is it? Do you have a recent snapshot from which you can restore?

Can you also describe the broken index? How many shards? How many replicas?

---

<div class="post-metadata">

**Author:** ![Shubhankar\_Sarda](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@Shubhankar\_Sarda](https://discuss.elastic.co/u/Shubhankar_Sarda)\
**Post date:** [February 3, 2019, 7:50pm UTC](https://discuss.elastic.co/t/accidentally-deleted-the-state-folder-of-the-index/166873/3 "2019-02-03T19:50:57Z")

</div>

Hi David,  
I had a single dedicated master node. 5 shards. Unfortunately i was in the process of setting up replicas when this happened so no, no replicas and no snapshots.  
I am running elasticsearch 5.1

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [February 3, 2019, 8:04pm UTC](https://discuss.elastic.co/t/accidentally-deleted-the-state-folder-of-the-index/166873/4 "2019-02-03T20:04:21Z")

</div>

Ok, there is no path forward that doesn't risk losing data, possibly silently, so the best thing to do is to delete this index and recreate it from wherever it came from in the first place.

> [@Shubhankar\_Sarda](#):
>
> I had a single dedicated master node.

If you want to try a risky path, there should be a copy of the lost folder on the dedicated master node as well as the one that you deleted on the data node. You can try shutting down both nodes and copying across the corresponding folder (i.e. `$(path.data)/nodes/0/indices/FJm8c84mQ6uIsPSzIZpr9A/_state`). If you are lucky, this might restore the index.

---

<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 3, 2019, 8:04pm UTC](https://discuss.elastic.co/t/accidentally-deleted-the-state-folder-of-the-index/166873/5 "2019-03-03T20:04:23Z")

</div>

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