# Snapshot Policy Based on Data Phase

**URL:** <https://discuss.elastic.co/t/snapshot-policy-based-on-data-phase/259595>\
**Category:** Elasticsearch\
**Tags:** slm-snapshot-lifecycle-management\
**Created:** [December 24, 2020, 3:31pm UTC](https://discuss.elastic.co/t/snapshot-policy-based-on-data-phase/259595 "2020-12-24T15:31:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![BenB196](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benb196/32/83401_2.png) [@BenB196](https://discuss.elastic.co/u/BenB196)\
**Post date:** [December 24, 2020, 3:31pm UTC](https://discuss.elastic.co/t/snapshot-policy-based-on-data-phase/259595/1 "2020-12-24T15:31:36Z")

</div>

Hi All,

I was wondering if it's possible to create snapshot policies that include/exclude indices based on their phase? I wasn't able to find any documentation on this and didn't see any posts about it.

The use case I am interested in is the following:

Have two (2) S3 repositories:

- S3\_Repo\_A is on-prem and has a 25Gbps connection to the cluster
- S3\_Repo\_B is in the cloud and has a 1Gbps connection to the cluster

I would like to back up all indexes that match the pattern `index-*` (can also be a data stream)

It order to meet Mean Time To Recovery (MTTR) I'd like to have three (3) snapshot policies setup.

1. SLM\_Policy\_Hourly\_Hot:
  - Hourly snaphot of `index-*` WHERE index phase is hot
  - S3 Repo: S3\_Repo\_A

2. SLM\_Policy\_Daily\_Warm:
  - Daily snapshot of `index-*` WHERE index phase is warm
  - S3 Repo: S3\_Repo\_A

3. SLM\_Policy\_Daily\_Cold:
  - Daily snapshot of `index-*` WHERE index phase is cold
  - S3 Repo: S3\_Repo\_B

Is the above currently possible?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [December 24, 2020, 4:47pm UTC](https://discuss.elastic.co/t/snapshot-policy-based-on-data-phase/259595/2 "2020-12-24T16:47:36Z")

</div>

I don't think you can, but I also don't really understand the advantages of this scheme over simply snapshotting everything hourly into `S3_Repo_A` and daily into `S3_Repo_B`. Can you explain your thinking a bit more clearly?

---

<div class="post-metadata">

**Author:** ![BenB196](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benb196/32/83401_2.png) [@BenB196](https://discuss.elastic.co/u/BenB196)\
**Post date:** [December 24, 2020, 4:49pm UTC](https://discuss.elastic.co/t/snapshot-policy-based-on-data-phase/259595/3 "2020-12-24T16:49:56Z")

</div>

Yes, for a bit more clarity, S3\_Repo\_A has limited storage available to it, and does not have the required space needed to back up everything in `index-*`. So while policies 1 and 2 could be merged, policy 3 wouldn't be able to. The cold phase will hold the majority of data, and therefore needs to be offloaded to S3\_Repo\_B.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [December 24, 2020, 5:36pm UTC](https://discuss.elastic.co/t/snapshot-policy-based-on-data-phase/259595/4 "2020-12-24T17:36:03Z")

</div>

Thanks, I see. I guess we generally expect that every repository is at least as big as the cluster to which it's attached but that isn't the case for you. An interesting idea for sure, but no I don't think it's possible today.

---

<div class="post-metadata">

**Author:** ![BenB196](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benb196/32/83401_2.png) [@BenB196](https://discuss.elastic.co/u/BenB196)\
**Post date:** [December 24, 2020, 5:38pm UTC](https://discuss.elastic.co/t/snapshot-policy-based-on-data-phase/259595/5 "2020-12-24T17:38:27Z")

</div>

Thanks for the information @DavidTurner. Would this make a good feature request for Elasticsearch, or do you think it's something that won't be supported?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [December 24, 2020, 5:46pm UTC](https://discuss.elastic.co/t/snapshot-policy-based-on-data-phase/259595/6 "2020-12-24T17:46:17Z")

</div>

> [@BenB196](#):
>
> Would this make a good feature request for Elasticsearch, or do you think it's something that won't be supported?

Seems like a reasonable request, but we're not exactly short of those 😉 It might not happen any time soon, unless it turns out to be a very popular idea.

---

<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:** [January 21, 2021, 5:46pm UTC](https://discuss.elastic.co/t/snapshot-policy-based-on-data-phase/259595/7 "2021-01-21T17:46:18Z")

</div>

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