# ILM deleted indices before reaching min\_age

**URL:** <https://discuss.elastic.co/t/ilm-deleted-indices-before-reaching-min-age/323696>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [January 23, 2023, 4:36am UTC](https://discuss.elastic.co/t/ilm-deleted-indices-before-reaching-min-age/323696 "2023-01-23T04:36:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RapTvin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raptvin/32/86995_2.png) [@RapTvin](https://discuss.elastic.co/u/RapTvin)\
**Post date:** [January 23, 2023, 4:36am UTC](https://discuss.elastic.co/t/ilm-deleted-indices-before-reaching-min-age/323696/1 "2023-01-23T04:36:12Z")

</div>

## Problem

We have set the following index management policy for indices, which moves the index to delete phase after 32 days & then once the snapshot is completed the index will be deleted.

```json
{
  "policy": {
    "phases": {
      "hot": {
        "min_age": "0ms",
        "actions": {}
      },
      "delete": {
        "min_age": "32d",
        "actions": {
          "delete": {
          },
          "wait_for_snapshot": {
            "policy": "recurring-snapshots"
          }
        }
      }
    }
  }
}

```

Recently, all the indices got deleted before they reached the `min_age` i.e 32 days. However after restoring the data from the snapshot the ILM is again working fine. We checked the trigger for index deletion & it was indeed done by the same policy and wasn't a manual trigger. Checked this through logs.

## Debugging approach

1. Check when the index was deleted through logs
2. Check through `.ds-ilm-history-*` index pattern for the trigger of ILM moving the index to delete phase, also checked the phase\_definition on the document given here as an output the definition wasn't modified.

## Questions.

1. Is there a way to find how did such a event got triggered?

---

<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:** [February 20, 2023, 4:36am UTC](https://discuss.elastic.co/t/ilm-deleted-indices-before-reaching-min-age/323696/2 "2023-02-20T04:36:21Z")

</div>

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