# Daily index - lifecycle policies

**URL:** <https://discuss.elastic.co/t/daily-index-lifecycle-policies/221115>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [February 26, 2020, 9:47pm UTC](https://discuss.elastic.co/t/daily-index-lifecycle-policies/221115 "2020-02-26T21:47:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Federico\_Mieres](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/federico_mieres/32/63373_2.png) [@Federico\_Mieres](https://discuss.elastic.co/u/Federico_Mieres)\
**Post date:** [February 26, 2020, 9:47pm UTC](https://discuss.elastic.co/t/daily-index-lifecycle-policies/221115/1 "2020-02-26T21:47:44Z")

</div>

So i am trying to set lifecycle policies to my existing indexes coming from logstash. my indexes follow a patterm `myindex-yyyy-mm-dd` so i have an index per day.

So far, [https://www.elastic.co/guide/en/elasticsearch/reference/7.4/getting-started-index-lifecycle-management.html](https://www.elastic.co/guide/en/elasticsearch/reference/7.4/getting-started-index-lifecycle-management.html) does not work since this is made for a different index pattern like `myindex-nnnnn`

Then, i created a policy with warm cold and delete specifications and added a template

```auto
PUT _template/hot-warm-cold-delete-180days-template
{
  "order": 10,
  "index_patterns": ["myindex-*"],
  "settings": {
    "index.lifecycle.name": "hot-warm-cold-delete-180days",
    "index.routing.allocation.require.data": "hot"
  }
}

```

but cant really associate my policy since mhy indexes doesnt have an alias.

When i try to give them an alias, i get an exception `has more than one write alias`.

So, how can i achive to put on warm or cold indexes whose pattern are older than a month or so ?

---

<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 25, 2020, 9:55pm UTC](https://discuss.elastic.co/t/daily-index-lifecycle-policies/221115/2 "2020-03-25T21:55:13Z")

</div>

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