# Snapshot policy which is only triggered by ILM and not on its own schedule

**URL:** <https://discuss.elastic.co/t/snapshot-policy-which-is-only-triggered-by-ilm-and-not-on-its-own-schedule/277758>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management, slm-snapshot-lifecycle-management\
**Created:** [July 5, 2021, 2:47am UTC](https://discuss.elastic.co/t/snapshot-policy-which-is-only-triggered-by-ilm-and-not-on-its-own-schedule/277758 "2021-07-05T02:47:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![pk.241011](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pk.241011/32/86285_2.png) [@pk.241011](https://discuss.elastic.co/u/pk.241011)\
**Post date:** [July 5, 2021, 2:47am UTC](https://discuss.elastic.co/t/snapshot-policy-which-is-only-triggered-by-ilm-and-not-on-its-own-schedule/277758/1 "2021-07-05T02:47:34Z")

</div>

Hi,  
Is it possible to have a snapshot policy which does not have a schedule? I wanted the ILM to create a snapshot by invoking the snapshot policy just before the index is deleted at the end of cold phase.

I want to use the " Wait for snapshot policy" feature in the ILM. But any snapshot policy I create has a schedule attached to it. That means that there will be snapshots taken outside the realm of ILM too.

I am thinking of creating an policy which is executed once every year. So that ILM can run it for the index it is going to delete anytime it deems fit. But the policy as such will be run at the end of the year. I can then maybe manually delete that snapshot to avoid duplicate data.

But this does not seems very elegant way of doing it.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 5, 2021, 2:50am UTC](https://discuss.elastic.co/t/snapshot-policy-which-is-only-triggered-by-ilm-and-not-on-its-own-schedule/277758/2 "2021-07-05T02:50:06Z")

</div>

ILM and SLM are separate, in that you cannot tell ILM to trigger an SLM policy, or even a snapshot directly.

I'm not sure there is a clean solution here sorry. However I would encourage you to create a [feature request](https://github.com/elastic/elasticsearch/issues/new/choose) so that the ILM+SLM team can get an idea of what you would like to do and how we might be able to support it.

---

<div class="post-metadata">

**Author:** ![pk.241011](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pk.241011/32/86285_2.png) [@pk.241011](https://discuss.elastic.co/u/pk.241011)\
**Post date:** [July 5, 2021, 4:54am UTC](https://discuss.elastic.co/t/snapshot-policy-which-is-only-triggered-by-ilm-and-not-on-its-own-schedule/277758/3 "2021-07-05T04:54:26Z")

</div>

I might be using something in beta then. I will check and let you know.

I think I should have mentioned that I am using the cloud offering of Elastic and have standard cloud subscription. My mistake.

Version: 7.13.1

This is what I see in the Kibana console when creating ILM policy.

 ![snapshotPolicy](https://us1.discourse-cdn.com/elastic/original/3X/4/5/459631500fdae543d17aec8538e5acfc8b505bb0.jpeg)

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 5, 2021, 4:55am UTC](https://discuss.elastic.co/t/snapshot-policy-which-is-only-triggered-by-ilm-and-not-on-its-own-schedule/277758/4 "2021-07-05T04:55:49Z")

</div>

Yep I understand that, but it's only waiting for that as opposed to triggering it. So it's only ever a passive action and not what you want 🙂

---

<div class="post-metadata">

**Author:** ![pk.241011](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pk.241011/32/86285_2.png) [@pk.241011](https://discuss.elastic.co/u/pk.241011)\
**Post date:** [July 5, 2021, 5:00am UTC](https://discuss.elastic.co/t/snapshot-policy-which-is-only-triggered-by-ilm-and-not-on-its-own-schedule/277758/5 "2021-07-05T05:00:45Z")

</div>

I am confused now. I did see the snapshots getting taken at times which was not the scheduled time. I will go back and have a look at the timestamps added to the snapshots.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 5, 2021, 6:00am UTC](https://discuss.elastic.co/t/snapshot-policy-which-is-only-triggered-by-ilm-and-not-on-its-own-schedule/277758/6 "2021-07-05T06:00:50Z")

</div>

There are automatic snapshots in Elastic Cloud, but they might not be the ones you are talking about 🙂

---

<div class="post-metadata">

**Author:** ![pk.241011](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pk.241011/32/86285_2.png) [@pk.241011](https://discuss.elastic.co/u/pk.241011)\
**Post date:** [July 25, 2021, 11:43pm UTC](https://discuss.elastic.co/t/snapshot-policy-which-is-only-triggered-by-ilm-and-not-on-its-own-schedule/277758/7 "2021-07-25T23:43:53Z")

</div>

Replying to provide a closure on this.

Indeed the ILM blocks at the last stage e.g. delete phase when you have chosen "Wait for snapshot policy".

Once the Snapshot policy executes as per its schedule the "Delete" phase of the ILM runs.

Either I am not reading the documentation properly or maybe the documentation can be a little more verbose. 🙂

---

<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:** [August 22, 2021, 11:43pm UTC](https://discuss.elastic.co/t/snapshot-policy-which-is-only-triggered-by-ilm-and-not-on-its-own-schedule/277758/8 "2021-08-22T23:43:56Z")

</div>

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