# Elasticsearch index deleted how to recover

**URL:** <https://discuss.elastic.co/t/elasticsearch-index-deleted-how-to-recover/8336>\
**Category:** Elasticsearch\
**Created:** [July 6, 2012, 5:34am UTC](https://discuss.elastic.co/t/elasticsearch-index-deleted-how-to-recover/8336 "2012-07-06T05:34:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashu\_raikvar](https://avatars.discourse-cdn.com/v4/letter/a/3da27b/32.png) [@ashu\_raikvar](https://discuss.elastic.co/u/ashu_raikvar)\
**Post date:** [July 6, 2012, 5:34am UTC](https://discuss.elastic.co/t/elasticsearch-index-deleted-how-to-recover/8336/1 "2012-07-06T05:34:35Z")

</div>

Hi,

I am in a fix.I accidently deleted my index using head.I have that index as  
rar file which i copy pasted back in ES but the ES is not detecting the  
index.please suggest me a solution.

Thanking You  
Ashutosh Raikvar  
ES lover , cheers

---

<div class="post-metadata">

**Author:** ![drewr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/drewr/32/7803_2.png) [@drewr](https://discuss.elastic.co/u/drewr)\
**Post date:** [July 6, 2012, 1:44pm UTC](https://discuss.elastic.co/t/elasticsearch-index-deleted-how-to-recover/8336/2 "2012-07-06T13:44:13Z")

</div>

ashu raikvar wrote:

> I am in a fix.I accidently deleted my index using head.I have that  
> index as rar file which i copy pasted back in ES but the ES is not  
> detecting the index.please suggest me a solution.

If the index was created using ES prior to version 0.19.8, which it  
sounds like it was, you won't be able to use the files on disk.  
You'll have to either reindex from source data or create source data  
directly from Lucene.

However, if you _are_ using 0.19.8 and this still happened, then it  
might be a bug. Support was added for recognizing an index on disk  
and handling just such a case.

> <https://github.com/elastic/elasticsearch/issues/2067>
>
> Dangling indices happen when a node that has several indices stored locally, joi…ns a cluster and those local indices do not exists in the cluster metadata. This usually does not happen, especially not with proper gateway.recover\_after\_nodes flag, but still, users can by mistake get into this state.
> 
> A new setting \`gateway.local.auto\_import\_dangled\` setting, with possible values of \`no\` (never import dangling indices, but also delay the delation of them), \`yes\` (import dangling indices), and \`closed\` (import dangling indices, but in closed state). The default value is \`yes\`.

-Drew

---

<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:** [July 6, 2017, 3:21am UTC](https://discuss.elastic.co/t/elasticsearch-index-deleted-how-to-recover/8336/3 "2017-07-06T03:21:14Z")

</div>


