# Removing indices using Curator

**URL:** <https://discuss.elastic.co/t/removing-indices-using-curator/167860>\
**Category:** Elasticsearch\
**Tags:** curator\
**Created:** [February 11, 2019, 1:12pm UTC](https://discuss.elastic.co/t/removing-indices-using-curator/167860 "2019-02-11T13:12:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vasek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vasek/32/136636_2.png) [@vasek](https://discuss.elastic.co/u/vasek)\
**Post date:** [February 11, 2019, 1:12pm UTC](https://discuss.elastic.co/t/removing-indices-using-curator/167860/1 "2019-02-11T13:12:29Z")

</div>

Hello  
I would like to ensure similar size of indices and at the same time I need ensure different retention policy for some indices. Could you please give me some tip how to do that?

**SIMILAR SIZE OF INDICES**  
I would like to have indices with **similar size** (say 20 gb). For this purpose I am using `rollover API` in Curator. It works well - thank for explanation in [Elastic Forum](https://discuss.elastic.co/t/rollover-alias-with-date/126469)

**DIFFERENT RETENTION POLICY**  
Some indices I can store only for 7 days and some for 2 months.

**FIELD\_STATS**  
Is it possible to use `field_stats` for difference retention policy of indices? I did not find some options how to do this using Curator.

**ONE EXAMPLE**  
If we have indices which are rolloved without option "max\_age",  
indicies can be created like this:

```
index-aaa-2018.01.01-00001 (25 gb)
index-aaa-2018.01.01-00002 (25 gb)
index-aaa-2018.01.02-00001 (25 gb)
index-aaa-2018.01.20-00001 (25 gb)
index-aaa-2018.01.20-00002 (25 gb)

```

All logs between dates 2018.01.02 - 2018.01.20 will be stored to index `index-aaa-2018.01.02-00001`, because **conditions of size** or **number of document** were met on day 2018.01.20.

Now If I use curator for **deleting indices by name** (index prefix) and say we can delete indices index-aaa older than 3 days and today is 2018.01.20, it means index `index-aaa-2018.01.17` and older will be deleted.

It means that index `index-aaa-2018.01.02-00001` will be deleted too but it contains data which we can preserve (data from days 2018.01.18, 2018.01.19).

What is the best way If we can have indices with similar size with preservation different retention policy?

Regads,  
Vašek

---

<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 11, 2019, 1:12pm UTC](https://discuss.elastic.co/t/removing-indices-using-curator/167860/2 "2019-03-11T13:12:31Z")

</div>

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