# Is it possible to Snapshot ALL indices and exclude some?

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-snapshot-all-indices-and-exclude-some/237047>\
**Category:** Elasticsearch\
**Tags:** slm-snapshot-lifecycle-management\
**Created:** [June 15, 2020, 1:58am UTC](https://discuss.elastic.co/t/is-it-possible-to-snapshot-all-indices-and-exclude-some/237047 "2020-06-15T01:58:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AClerk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aclerk/32/55297_2.png) [@AClerk](https://discuss.elastic.co/u/AClerk)\
**Post date:** [June 15, 2020, 1:58am UTC](https://discuss.elastic.co/t/is-it-possible-to-snapshot-all-indices-and-exclude-some/237047/1 "2020-06-15T01:58:42Z")

</div>

Hey there,  
The use case is:  
I want to default snapshot all indices. But, I want to leave out a few of them.  
The environment I am working on is dynamic, and new indices are created daily. I want to determine with each new index, rather to snapshot or not.

I see that it is possible to snapshot all

```auto
PUT /_slm/policy/nightly-snapshots
{
...
  "config": { 
    "indices": ["*"] 
  },
...
}

```

Or some

```auto
PUT /_slm/policy/nightly-snapshots
{
... 
  "config": { 
    "indices": ["index-1, index2"] 
  },
...
}

```

So I am after something like

```auto
...
"config": {
   "indices": ["*"],
   "exceptions": ["index-1, index-2, ..., index-N]
},
...

```

The alternative is of-course to add all indices which will make a very tedious job.

Thanks!

---

<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:** [July 13, 2020, 1:58am UTC](https://discuss.elastic.co/t/is-it-possible-to-snapshot-all-indices-and-exclude-some/237047/2 "2020-07-13T01:58:52Z")

</div>

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