# "Logrotate" for Curator

**URL:** <https://discuss.elastic.co/t/logrotate-for-curator/156261>\
**Category:** Elasticsearch\
**Created:** [November 12, 2018, 9:27am UTC](https://discuss.elastic.co/t/logrotate-for-curator/156261 "2018-11-12T09:27:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![aleksei.saiko](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@aleksei.saiko](https://discuss.elastic.co/u/aleksei.saiko)\
**Post date:** [November 12, 2018, 9:27am UTC](https://discuss.elastic.co/t/logrotate-for-curator/156261/1 "2018-11-12T09:27:01Z")

</div>

Hi,  
Currently , I'm making backup using Curator. And wrote a script for deleting old Snapshots.  
Is there something in Curator, that can make such thing without a script? Some kind of Logrotate, to remove old Snapshots?

Thanks in advance!

---

<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 12, 2018, 12:46pm UTC](https://discuss.elastic.co/t/logrotate-for-curator/156261/2 "2018-11-12T12:46:12Z")

</div>

UPDATE: 🤦🏼‍♂️ The link was correct, but the link text should have read `delete_snapshots`.

You mean like the [`delete_snapshots` action](https://www.elastic.co/guide/en/elasticsearch/client/curator/5.5/delete_snapshots.html)?

---

<div class="post-metadata">

**Author:** ![aleksei.saiko](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@aleksei.saiko](https://discuss.elastic.co/u/aleksei.saiko)\
**Post date:** [November 12, 2018, 1:42pm UTC](https://discuss.elastic.co/t/logrotate-for-curator/156261/3 "2018-11-12T13:42:16Z")

</div>

Can I specify to keep the last 30 snapshots and deletes anything older with "delete\_snapshot" action?

---

<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 12, 2018, 1:54pm UTC](https://discuss.elastic.co/t/logrotate-for-curator/156261/4 "2018-11-12T13:54:05Z")

</div>

Yes. Curator uses the age filter for snapshots the same way as with indices.

---

<div class="post-metadata">

**Author:** ![aleksei.saiko](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@aleksei.saiko](https://discuss.elastic.co/u/aleksei.saiko)\
**Post date:** [November 12, 2018, 1:54pm UTC](https://discuss.elastic.co/t/logrotate-for-curator/156261/5 "2018-11-12T13:54:29Z")

</div>

I see, great, thanks a lot.

---

<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 10, 2018, 1:54pm UTC](https://discuss.elastic.co/t/logrotate-for-curator/156261/6 "2018-12-10T13:54:38Z")

</div>

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