# Snapshot based on the age of the index

**URL:** <https://discuss.elastic.co/t/snapshot-based-on-the-age-of-the-index/231144>\
**Category:** Elasticsearch\
**Tags:** slm-snapshot-lifecycle-management\
**Created:** [May 5, 2020, 12:06pm UTC](https://discuss.elastic.co/t/snapshot-based-on-the-age-of-the-index/231144 "2020-05-05T12:06:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![harish\_gopi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harish_gopi/32/67722_2.png) [@harish\_gopi](https://discuss.elastic.co/u/harish_gopi)\
**Post date:** [May 5, 2020, 12:06pm UTC](https://discuss.elastic.co/t/snapshot-based-on-the-age-of-the-index/231144/1 "2020-05-05T12:06:29Z")

</div>

We have daily log indexed in elastic search with logs-%m-%d-%y format, so we need to create the snapshot for indices greater than 30 days and archive it in amazon s3. I came across way to create snapshot using cron schedule and delete the index after certain period of time using ILM.

But is there any way i could create snapshot based on the age of the index like create the snapshot of an index after 30 days from creation of index or create a snapshot when it reaches the cold phase . I came across wait for snapshot policy in ILM but doesn't seem to resolve my actual problem. Any help will be appreciated thank you.

---

<div class="post-metadata">

**Author:** ![Luca\_Belluccini](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luca_belluccini/32/33239_2.png) [@Luca\_Belluccini](https://discuss.elastic.co/u/Luca_Belluccini)\
**Post date:** [May 5, 2020, 6:33pm UTC](https://discuss.elastic.co/t/snapshot-based-on-the-age-of-the-index/231144/2 "2020-05-05T18:33:30Z")

</div>

What do you use for creating the Snapshots?

Do you use Snapshot Lifecycle Management or [Curator](https://www.elastic.co/guide/en/elasticsearch/client/curator/current/filtertype_age.html).

Curator filters allow you to snapshot only indices which have a creation date past a given amount of time (see link above).

On SLM this is not possible (see [current capabilities here](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/slm-api-put-policy.html), as the only filter available is on the index name.

Snapshots are usually intended for backup (get what I have now so I can restore everything), while you seem to use snapshots as a phase before archiving.

---

<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 2, 2020, 6:33pm UTC](https://discuss.elastic.co/t/snapshot-based-on-the-age-of-the-index/231144/3 "2020-06-02T18:33:31Z")

</div>

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