# How to create a rollover policy in ILM which automatically moves historical indices into warm node and keeps last 2 quarter indices in hot nodes

**URL:** <https://discuss.elastic.co/t/how-to-create-a-rollover-policy-in-ilm-which-automatically-moves-historical-indices-into-warm-node-and-keeps-last-2-quarter-indices-in-hot-nodes/270957>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [April 22, 2021, 12:02pm UTC](https://discuss.elastic.co/t/how-to-create-a-rollover-policy-in-ilm-which-automatically-moves-historical-indices-into-warm-node-and-keeps-last-2-quarter-indices-in-hot-nodes/270957 "2021-04-22T12:02:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sagar7645](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@sagar7645](https://discuss.elastic.co/u/sagar7645)\
**Post date:** [April 22, 2021, 12:02pm UTC](https://discuss.elastic.co/t/how-to-create-a-rollover-policy-in-ilm-which-automatically-moves-historical-indices-into-warm-node-and-keeps-last-2-quarter-indices-in-hot-nodes/270957/1 "2021-04-22T12:02:33Z")

</div>

Hi Team,

I am using elasticsearch 7.9 need to create a rollover ILM policy to keep historical indices in warm node and last 2 quarter indices on hot node.

Can you please suggest me how to do that in a ILM policy. Is it going to create new indices. Do i need to create a new template or in existing template can it be done.

Please help

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 27, 2021, 4:49am UTC](https://discuss.elastic.co/t/how-to-create-a-rollover-policy-in-ilm-which-automatically-moves-historical-indices-into-warm-node-and-keeps-last-2-quarter-indices-in-hot-nodes/270957/2 "2021-04-27T04:49:53Z")

</div>

ILM won't work for time frames like "last quarter", it will work for things like 3 months, if that will do what you need?

---

<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 25, 2021, 4:50am UTC](https://discuss.elastic.co/t/how-to-create-a-rollover-policy-in-ilm-which-automatically-moves-historical-indices-into-warm-node-and-keeps-last-2-quarter-indices-in-hot-nodes/270957/3 "2021-05-25T04:50:33Z")

</div>

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