# Curator remove snapshot after X backups

**URL:** <https://discuss.elastic.co/t/curator-remove-snapshot-after-x-backups/87545>\
**Category:** Elasticsearch\
**Created:** [May 30, 2017, 9:45am UTC](https://discuss.elastic.co/t/curator-remove-snapshot-after-x-backups/87545 "2017-05-30T09:45:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![living-albert](https://avatars.discourse-cdn.com/v4/letter/l/958977/32.png) [@living-albert](https://discuss.elastic.co/u/living-albert)\
**Post date:** [May 30, 2017, 9:45am UTC](https://discuss.elastic.co/t/curator-remove-snapshot-after-x-backups/87545/1 "2017-05-30T09:45:00Z")

</div>

Hello,

I'm performing a snapshot every 30 minuts all day with crontab. I only would like to save the last 30 backups. Is there any way of counting the amount of snapshots and remove the rest?

Thanks.

---

<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:** [May 30, 2017, 2:24pm UTC](https://discuss.elastic.co/t/curator-remove-snapshot-after-x-backups/87545/2 "2017-05-30T14:24:03Z")

</div>

Yes. Use the [count filter](https://www.elastic.co/guide/en/elasticsearch/client/curator/5.0/filtertype_count.html).

---

<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 27, 2017, 2:24pm UTC](https://discuss.elastic.co/t/curator-remove-snapshot-after-x-backups/87545/3 "2017-06-27T14:24:14Z")

</div>

Closed on June 27, 2017, 2:24pm UTC

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