# Rollover index API

**URL:** <https://discuss.elastic.co/t/rollover-index-api/197856>\
**Category:** Elasticsearch\
**Created:** [September 3, 2019, 12:35pm UTC](https://discuss.elastic.co/t/rollover-index-api/197856 "2019-09-03T12:35:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![111204](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111204/32/53509_2.png) [@111204](https://discuss.elastic.co/u/111204)\
**Post date:** [September 3, 2019, 12:35pm UTC](https://discuss.elastic.co/t/rollover-index-api/197856/1 "2019-09-03T12:35:26Z")

</div>

I have configured the rollover index API for some indices.

For example, the configuration of rollover conditions looks like this:

```
{
  "conditions": {
    "max_age": "7d",
    "max_docs": 1000,
    "max_size": "5gb"
  }
}

```

Each time, before inserting a new record, I perform

```
POST / logs_write / _rollover
{
  "conditions": {
    "max_age": "7d",
    "max_docs": 1000,
    "max_size": "5gb"
  }
}

```

Everything fulfills perfectly, and when the condition is met, they are created  
new indices -000001, -000002, -000003, etc.

But I noticed that, the old parts on the production are not saved  
and when a new index is created, for example, -000003 then the index is -000002  
deleted.

What can cause this behavior?

No additional scripts to remove or  
life cycle management is not configured.

I am using elasticsearch aws 6.7.0

---

<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:** [October 1, 2019, 12:49pm UTC](https://discuss.elastic.co/t/rollover-index-api/197856/2 "2019-10-01T12:49:57Z")

</div>

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