# Index rollover with date and a counter

**URL:** <https://discuss.elastic.co/t/index-rollover-with-date-and-a-counter/182855>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [May 27, 2019, 7:47am UTC](https://discuss.elastic.co/t/index-rollover-with-date-and-a-counter/182855 "2019-05-27T07:47:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sadiesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sadiesh/32/38868_2.png) [@sadiesh](https://discuss.elastic.co/u/sadiesh)\
**Post date:** [May 27, 2019, 7:47am UTC](https://discuss.elastic.co/t/index-rollover-with-date-and-a-counter/182855/1 "2019-05-27T07:47:29Z")

</div>

Hi,  
I have a index which is more than 500GB per day(index-2019.05.27) . I want to make a rollover for every 4 hr so it will a create a new index  
index-2019.05.27-000001  
index-2019.05.27-000002  
index-2019.05.27-000003  
index-2019.05.27-000004

And next day its should start with  
index-2019.05.28-000001

Please let me know how to achieve this .

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 27, 2019, 7:48am UTC](https://discuss.elastic.co/t/index-rollover-with-date-and-a-counter/182855/2 "2019-05-27T07:48:48Z")

</div>

I do not think this is possible as the counter is not reset per day. Why do you require a date in the index name at all? Why not just use the sequence number?

---

<div class="post-metadata">

**Author:** ![sadiesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sadiesh/32/38868_2.png) [@sadiesh](https://discuss.elastic.co/u/sadiesh)\
**Post date:** [May 27, 2019, 8:10am UTC](https://discuss.elastic.co/t/index-rollover-with-date-and-a-counter/182855/3 "2019-05-27T08:10:51Z")

</div>

Hi Chris ,  
Thanks for the reply .  
The requirement is , I have to take a snapshot of everyday index and store in S3 using s3 repository plugin .  
The stored logs will be restored back by the user related to respective date .

---

<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:** [June 24, 2019, 8:10am UTC](https://discuss.elastic.co/t/index-rollover-with-date-and-a-counter/182855/4 "2019-06-24T08:10:51Z")

</div>

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