# Delete indices curator 4.2

**URL:** <https://discuss.elastic.co/t/delete-indices-curator-4-2/66701>\
**Category:** Elasticsearch\
**Created:** [November 21, 2016, 11:08am UTC](https://discuss.elastic.co/t/delete-indices-curator-4-2/66701 "2016-11-21T11:08:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmitry1980](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@dmitry1980](https://discuss.elastic.co/u/dmitry1980)\
**Post date:** [November 21, 2016, 11:08am UTC](https://discuss.elastic.co/t/delete-indices-curator-4-2/66701/1 "2016-11-21T11:08:17Z")

</div>

1. I install curator 4.2 on ELK server (kibana 4.6, elasticsearch 2.4, logstash 2.4) When run command  
curator\_cli delete\_snapshots --repository my\_backup --filter\_list '[{"filtertype":"age","source":"name","direction":"older", "timestring": "'%Y.%m.%d'", "unit":"days","unit\_count":1},{"filtertype":"pattern","kind":"prefix","value":"snapshot-"}]' delete only snapshots but date in folder indices not delete.

1 ) how to remove data indices together with snapshots?  
2 I want delete indices date in month older 3.  
curator\_cli delete\_indices --filter\_list '[{"filtertype":"age","source":"name","direction":"older", "timestring": "'%Y.%m.%d'", "unit":"days","unit\_count":90},{"filtertype":"pattern","kind":"prefix","value":"logstash-"}]'  
But I will delete date older 90 day but not delete the three months.  
How delete indices in month?

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [November 21, 2016, 4:03pm UTC](https://discuss.elastic.co/t/delete-indices-curator-4-2/66701/2 "2016-11-21T16:03:27Z")

</div>

Can you please explain a bit further? When you ask how to delete indices in months, are the indices named with a month-style pattern, e.g. `indexname-2016.10`, `indexname-2016.09`, or something like that? Or are you trying to do something else?

---

<div class="post-metadata">

**Author:** ![dmitry1980](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@dmitry1980](https://discuss.elastic.co/u/dmitry1980)\
**Post date:** [November 22, 2016, 2:31pm UTC](https://discuss.elastic.co/t/delete-indices-curator-4-2/66701/3 "2016-11-22T14:31:13Z")

</div>

I applied (filtertype":"age","source":"name","direction":"older", "timestring": "'%Y.%m.%d'", "unit":"months","unit\_count":3)  
When you use month based trimming, curator starts counting at the first day of the current month, not the current day of the current month. For example, if today is April 15, and you want to delete indices that are 2 months older than today (delete: months: 2), curator doesn't delete indices that are dated older than February 15, it deletes indices older than February 1. That is, it goes back to the first day of the current month, then goes back two whole months from that date.

how to remove backup data indices logstash- together with snapshots?

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [November 22, 2016, 4:09pm UTC](https://discuss.elastic.co/t/delete-indices-curator-4-2/66701/4 "2016-11-22T16:09:45Z")

</div>

> [@dmitry1980](#):
>
> When you use month based trimming, curator starts counting at the first day of the current month, not the current day of the current month.

Can you provide evidence to support this? That statement is true for Curator 3, but Curator 4 just measures `unit` \* `unit_count` \* the number of seconds in `unit`, and counts back that many seconds from the current timestamp. It does not count whole months, or track the first day of the month, or anything like that.

---

<div class="post-metadata">

**Author:** ![dmitry1980](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@dmitry1980](https://discuss.elastic.co/u/dmitry1980)\
**Post date:** [November 23, 2016, 8:18am UTC](https://discuss.elastic.co/t/delete-indices-curator-4-2/66701/5 "2016-11-23T08:18:13Z")

</div>

I have no evidence to support this. Now I do not have indicies minimum 1,5 month that testing

---

<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:** [December 21, 2016, 8:18am UTC](https://discuss.elastic.co/t/delete-indices-curator-4-2/66701/6 "2016-12-21T08:18:13Z")

</div>

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