# Migrate from daily indices to ILM rollover with same index pattern?

**URL:** <https://discuss.elastic.co/t/migrate-from-daily-indices-to-ilm-rollover-with-same-index-pattern/221733>\
**Category:** Elasticsearch\
**Created:** [March 2, 2020, 4:34pm UTC](https://discuss.elastic.co/t/migrate-from-daily-indices-to-ilm-rollover-with-same-index-pattern/221733 "2020-03-02T16:34:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan\_Cohen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dan_cohen/32/44993_2.png) [@Dan\_Cohen](https://discuss.elastic.co/u/Dan_Cohen)\
**Post date:** [March 2, 2020, 4:34pm UTC](https://discuss.elastic.co/t/migrate-from-daily-indices-to-ilm-rollover-with-same-index-pattern/221733/1 "2020-03-02T16:34:18Z")

</div>

We have a bunch of daily indices matched by the index pattern `lambda-*` e.g. `lambda-2020-02-02`. We want to start using a size-based ilm rollover policy but we don't want to break our existing visualisations etc.

Is it possible for us to set up an index alias `lambda` and reindex the old date-based indexes onto the new alias?

Our plan is to modify the existing template with the new policy. What will happen?

Our expectation is that we can continue to write date-based indexes so long as they don't exceed the max age/size of the ilm policy. And then that'll give us the ability to reindex in the background and modify ingestion as a final step.

Our current plan:  
Day 1: we ingest into `lambda-2020-01-01`  
Day 2: we update the `lambda-*` template with the new policy and ingest into `lambda-2020-01-02`  
At this point, `lambda-2020-01-01` has no ILM policy, `lambda-2020-01-02` has the new policy attached. We also bootstrap `lambda` with `lambda-000001`  
Day 3: we ingest into `lambda-2020-01-03` and also reindex `lambda-2020-01-01` and `lambda-2020-01-02` onto `lambda` (which would write into the bootstrapped `lambda-00001`)  
Day 4: we switch ingestion to `lambda` and then reindex `lambda-2020-01-03` onto `lambda`  
Day 5: ingestion continues to `lambda` and we are finished migrating

Are we missing any subtleties that would stop this from working?

---

<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 30, 2020, 4:34pm UTC](https://discuss.elastic.co/t/migrate-from-daily-indices-to-ilm-rollover-with-same-index-pattern/221733/2 "2020-03-30T16:34:28Z")

</div>

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