# How to take snapshot for four different indices through curator

**URL:** <https://discuss.elastic.co/t/how-to-take-snapshot-for-four-different-indices-through-curator/238262>\
**Category:** Elasticsearch\
**Tags:** curator\
**Created:** [June 23, 2020, 12:48pm UTC](https://discuss.elastic.co/t/how-to-take-snapshot-for-four-different-indices-through-curator/238262 "2020-06-23T12:48:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gokulnath112](https://avatars.discourse-cdn.com/v4/letter/g/df788c/32.png) [@gokulnath112](https://discuss.elastic.co/u/gokulnath112)\
**Post date:** [June 23, 2020, 12:48pm UTC](https://discuss.elastic.co/t/how-to-take-snapshot-for-four-different-indices-through-curator/238262/1 "2020-06-23T12:48:31Z")

</div>

Hi Everyone..  
Greetings...! I want to write a curator job to take 4 indices backup. But the all indices name are not starts with same word.(all are having different names) . In other case i have another set of indices whose names ends with "-prod" Please help me to take snapshot for the both cases.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [June 23, 2020, 2:17pm UTC](https://discuss.elastic.co/t/how-to-take-snapshot-for-four-different-indices-through-curator/238262/2 "2020-06-23T14:17:09Z")

</div>

To snapshot _only_ 4 differently named indices, you should use a `pattern` filter with `kind` of `regex`, and use specific index names/patterns separated by pipes:

```auto
- filtertype: pattern
  kind: regex
  value: '^idx4.*$|^idx3.*^$|^idx2.*$|^idx1.*$'

```

This is documented, to an extent, [here](https://www.elastic.co/guide/en/elasticsearch/client/curator/5.8/filtertype_pattern.html).

---

<div class="post-metadata">

**Author:** ![gokulnath112](https://avatars.discourse-cdn.com/v4/letter/g/df788c/32.png) [@gokulnath112](https://discuss.elastic.co/u/gokulnath112)\
**Post date:** [June 24, 2020, 5:38am UTC](https://discuss.elastic.co/t/how-to-take-snapshot-for-four-different-indices-through-curator/238262/3 "2020-06-24T05:38:01Z")

</div>

That helps me a lot.

Ton of 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 22, 2020, 5:38am UTC](https://discuss.elastic.co/t/how-to-take-snapshot-for-four-different-indices-through-curator/238262/4 "2020-07-22T05:38:18Z")

</div>

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