# Curator restore index

**URL:** <https://discuss.elastic.co/t/curator-restore-index/132325>\
**Category:** Elasticsearch\
**Created:** [May 17, 2018, 11:34am UTC](https://discuss.elastic.co/t/curator-restore-index/132325 "2018-05-17T11:34:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![IMikeD](https://avatars.discourse-cdn.com/v4/letter/i/919ad9/32.png) [@IMikeD](https://discuss.elastic.co/u/IMikeD)\
**Post date:** [May 17, 2018, 11:34am UTC](https://discuss.elastic.co/t/curator-restore-index/132325/1 "2018-05-17T11:34:15Z")

</div>

Hello,  
I want to use the curator to restore indexes from snapshots by template  
restore.yml

```
actions:
1:
action: restore
description:> -
Restore index.
options:
repository: my_backup
skip_repo_fs_check: true
ignore_empty_list: True
timeout_override:
continue_if_exception: False
disable_action: False
filters:
- filtertype: pattern
kind: regex
value: '^ aktivka $'

```

gives error to curator.exceptions.NoSnapshots

I understand , my filter works on the snapshot name, not the index, how to defeat this problem?

---

<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:** [May 17, 2018, 12:03pm UTC](https://discuss.elastic.co/t/curator-restore-index/132325/2 "2018-05-17T12:03:19Z")

</div>

> [@IMikeD](#):
>
> how to defeat this problem?

Your paste is not properly formatted, so I can't tell what you have in your actual file. When pasting code, use the `</>` code tag in the editor, or encapsulate your text in triple back ticks like this:

````
```
PASTE HERE
```

````

However, if I might venture a guess, your regular expression value might have something to do with it:

> [@IMikeD](#):
>
> ```auto
> value: '^ aktivka $'
> 
> ```

You have spaces in your regex, which implies that you're looking for a snapshot name which starts and ends with a space, and has the value of `" aktivka "`, minus the quotes. Elasticsearch wouldn't let you create a snapshot with a name like that, so perhaps this is where the error is.

If you meant to imply that the "problem" is that you want to filter the indices in the restore, that's a different topic entirely.

---

<div class="post-metadata">

**Author:** ![IMikeD](https://avatars.discourse-cdn.com/v4/letter/i/919ad9/32.png) [@IMikeD](https://discuss.elastic.co/u/IMikeD)\
**Post date:** [May 17, 2018, 12:19pm UTC](https://discuss.elastic.co/t/curator-restore-index/132325/3 "2018-05-17T12:19:50Z")

</div>

I have a few snapshots  
{  
"snapshot" : "curator-20180513210004",  
"uuid" : "DMd49NjpRfiVh8qWAPfHcQ",  
"version\_id" : 6020299,  
"version" : "6.2.2",  
"indices" : [  
"aktivka-2018.04.28",  
"asa-2018.04.28",  
"metricbeat-6.2.3-2018.04.28",  
"winlogbeat-6.2.2-2018.04.28"  
],  
"include\_global\_state" : true,  
"state" : "SUCCESS",  
"start\_time" : "2018-05-13T21:00:32.378Z",  
"start\_time\_in\_millis" : 1526245232378,  
"end\_time" : "2018-05-13T21:05:05.421Z",  
"end\_time\_in\_millis" : 1526245505421,  
"duration\_in\_millis" : 273043,  
"failures" : [],  
"shards" : {  
"total" : 20,  
"failed" : 0,  
"successful" : 20  
}  
},  
{  
"snapshot" : "curator-20180514210002",  
"uuid" : "MZeDqY9hTxCTrD4Sz24aVQ",  
"version\_id" : 6020299,  
"version" : "6.2.2",  
"indices" : [  
"asa-2018.04.29",  
"winlogbeat-6.2.2-2018.04.29",  
"aktivka-2018.04.29",  
"metricbeat-6.2.3-2018.04.29"  
],  
"include\_global\_state" : true,  
"state" : "SUCCESS",  
"start\_time" : "2018-05-14T21:00:29.709Z",  
"start\_time\_in\_millis" : 1526331629709,  
"end\_time" : "2018-05-14T21:01:01.021Z",  
"end\_time\_in\_millis" : 1526331661021,  
"duration\_in\_millis" : 31312,  
"failures" : [],  
"shards" : {  
"total" : 20,  
"failed" : 0,  
"successful" : 20  
}  
},  
{  
"snapshot" : "curator-20180515210004",  
"uuid" : "lztZokZfSvWBsaZb5JCc8Q",  
"version\_id" : 6020299,  
"version" : "6.2.2",  
"indices" : [  
"asa-2018.04.30",  
"winlogbeat-6.2.2-2018.04.30"  
],  
"include\_global\_state" : true,  
"state" : "SUCCESS",  
"start\_time" : "2018-05-15T21:00:32.094Z",  
"start\_time\_in\_millis" : 1526418032094,  
"end\_time" : "2018-05-15T21:00:34.693Z",  
"end\_time\_in\_millis" : 1526418034693,  
"duration\_in\_millis" : 2599,  
"failures" : [],  
"shards" : {  
"total" : 10,  
"failed" : 0,  
"successful" : 10  
}  
}

and I want to restore all the indexes containing 'aktivka-'

---

<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:** [May 17, 2018, 2:00pm UTC](https://discuss.elastic.co/t/curator-restore-index/132325/4 "2018-05-17T14:00:51Z")

</div>

The [`restore`](https://www.elastic.co/guide/en/elasticsearch/client/curator/5.5/restore.html) action can only restore from one snapshot at a time. You either specify the [`name`](https://www.elastic.co/guide/en/elasticsearch/client/curator/5.5/option_name.html) of the snapshot, or Curator will use the most recent snapshot (regardless of what is in it).

Your configuration has not specified a setting for the [`indices`](https://www.elastic.co/guide/en/elasticsearch/client/curator/5.5/option_indices.html) option, which means that Curator would try to restore all indices from the designated snapshot. In Curator, indices must be specified using YAML array notation, which could be:

```auto
options:
  indices:
    - index1
    - index2

```

or

```auto
options:
  indices: ['index1', 'index2']

```

You can use [multi-index syntax](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/multi-index.html) for each array element. This means you could simply specify

```auto
options:
  indices: ['aktivka-*']

```

for your `indices` option to get the desired effect.

---

<div class="post-metadata">

**Author:** ![IMikeD](https://avatars.discourse-cdn.com/v4/letter/i/919ad9/32.png) [@IMikeD](https://discuss.elastic.co/u/IMikeD)\
**Post date:** [May 17, 2018, 2:41pm UTC](https://discuss.elastic.co/t/curator-restore-index/132325/5 "2018-05-17T14:41:09Z")

</div>

> [@theuntergeek](#):
>
> indices: ['aktivka-\*']

thank you.

---

<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:** [June 14, 2018, 2:41pm UTC](https://discuss.elastic.co/t/curator-restore-index/132325/6 "2018-06-14T14:41:14Z")

</div>

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