# Closed indices are included in snapshot policy

**URL:** <https://discuss.elastic.co/t/closed-indices-are-included-in-snapshot-policy/357697>\
**Category:** Elasticsearch\
**Tags:** slm-snapshot-lifecycle-management, snapshot-and-restore\
**Created:** [April 18, 2024, 11:04am UTC](https://discuss.elastic.co/t/closed-indices-are-included-in-snapshot-policy/357697 "2024-04-18T11:04:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishalk663](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vishalk663/32/117103_2.png) [@vishalk663](https://discuss.elastic.co/u/vishalk663)\
**Post date:** [April 18, 2024, 11:04am UTC](https://discuss.elastic.co/t/closed-indices-are-included-in-snapshot-policy/357697/1 "2024-04-18T11:04:04Z")

</div>

We are using the elasticsearch 7.13.3 version using eck operator in our openshift cluster. When we are using below snapshot policy it did not include the closed indices in a snapshot.

`PUT _slm/policy/elastic-snapshot { "name": "abc", "schedule": "xx xx * * * ?", "repository": "xyz", "config": { "ignore_unavailable": false, "include_global_state": false }, "retention": { "expire_after": "xxd", "min_count": x, "max_count": xxx } }`

When we took a snapshot manually with below command it includes closed indices in a snapshot

`PUT /_snapshot/xyz/manual-snapshot { "indices": "xxx-*", "expand_wildcards": "all" }`

As per this github ticket this feature is backported to elasticsearch version 7.x [Allow snapshotting replicated closed indices by ywelsch · Pull Request #39644 · elastic/elasticsearch · GitHub](https://github.com/elastic/elasticsearch/pull/39644)

How can we create a policy that creates snapshots that include closed indices in elasticsearch version 7.x

---

<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:** [April 18, 2024, 11:34am UTC](https://discuss.elastic.co/t/closed-indices-are-included-in-snapshot-policy/357697/2 "2024-04-18T11:34:51Z")

</div>

7.13 is _really_ old, long past EOL, so you need to upgrade as a matter of some urgency. In supported versions there's no good reason to close indices, so you can avoid this problem by keeping all your indices open.
