# Index getting deleted

**URL:** <https://discuss.elastic.co/t/index-getting-deleted/179331>\
**Category:** Elasticsearch\
**Created:** [May 2, 2019, 9:58am UTC](https://discuss.elastic.co/t/index-getting-deleted/179331 "2019-05-02T09:58:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aneesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aneesh/32/37819_2.png) [@aneesh](https://discuss.elastic.co/u/aneesh)\
**Post date:** [May 2, 2019, 9:58am UTC](https://discuss.elastic.co/t/index-getting-deleted/179331/1 "2019-05-02T09:58:50Z")

</div>

Is there any reason for Index getting deleted by itself. This index is heavier than the others (size = 300mb , rows= 100,000 +). Is there any mechanism that clears the index periodically.  
Or in any case , can the index deleted automatically.

Thanks in Advance

---

<div class="post-metadata">

**Author:** ![HenningAndersen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/henningandersen/32/48188_2.png) [@HenningAndersen](https://discuss.elastic.co/u/HenningAndersen)\
**Post date:** [May 2, 2019, 11:17am UTC](https://discuss.elastic.co/t/index-getting-deleted/179331/2 "2019-05-02T11:17:51Z")

</div>

Hi @aneesh,

index life cycle management does have features to allow deleting an index. See: [https://www.elastic.co/guide/en/elasticsearch/reference/current/index-lifecycle-management.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-lifecycle-management.html) for details.

I am not entirely sure if your question is based on lost data/index or because you would like an automated cleanup of data? In the former case, please elaborate on the symptoms.

---

<div class="post-metadata">

**Author:** ![aneesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aneesh/32/37819_2.png) [@aneesh](https://discuss.elastic.co/u/aneesh)\
**Post date:** [May 3, 2019, 11:14am UTC](https://discuss.elastic.co/t/index-getting-deleted/179331/3 "2019-05-03T11:14:05Z")

</div>

Thanks for reply.  
I asked this because we had a loss of data. ![IndexDelete](https://us1.discourse-cdn.com/elastic/original/3X/6/a/6aa7083b3a4b77f98c22af9aadc71eaf5b734e69.png)  
Now if i see the log (as in screen it says the index deleting.  
Does the log has information whether the index is deleted by application or by elasticsearch during index re-indexing or optimization or anything like that.  
I have the following question as well that can help me finding the solution for this issue:

a) How this index got deleted (by any chance from elastic)  
b)Why is it suggested to have minimum three nodes, Can the node configuration responsible for data deletion

> **[How many nodes should an Elasticsearch cluster have?](https://cpratt.co/how-many-nodes-should-an-elasticsearch-cluster-have/)**
>
> Similar to the question of how many shards to use with an Elasticsearch index, the number of nodes your cluster should have is hard to answer in a definitive way. Ultimately, it will boil down to questions like the following: How much data are you...

---

<div class="post-metadata">

**Author:** ![HenningAndersen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/henningandersen/32/48188_2.png) [@HenningAndersen](https://discuss.elastic.co/u/HenningAndersen)\
**Post date:** [May 3, 2019, 12:57pm UTC](https://discuss.elastic.co/t/index-getting-deleted/179331/4 "2019-05-03T12:57:47Z")

</div>

Hi @aneesh,

Unless you had tracing or debugging enabled, I think the log will not contain further evidence on the source of the index delete request.

a: Only API index deletion and index life cycle management should be able to delete user controlled indexes (monitoring and ML do have some index deletion of internal indices). You can check your ILM policies using GET \_ilm/policy, but these are only active if enabled on the indices as described in the ILM documentation linked to above.

b: 3 nodes is minimum to survive loosing one node (or disk) and ensures you can have continued operation through rolling restarts and upgrades. If you have only one node, you have no such safety, but assuming you have no hardware issues, data should still be stored. The number of nodes has no say in index deletion.

---

<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:** [May 31, 2019, 12:57pm UTC](https://discuss.elastic.co/t/index-getting-deleted/179331/5 "2019-05-31T12:57:47Z")

</div>

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