# Restoring particular index from a snapshot using Curator?

**URL:** <https://discuss.elastic.co/t/restoring-particular-index-from-a-snapshot-using-curator/77502>\
**Category:** Elasticsearch\
**Created:** [March 6, 2017, 12:57pm UTC](https://discuss.elastic.co/t/restoring-particular-index-from-a-snapshot-using-curator/77502 "2017-03-06T12:57:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)\
**Post date:** [March 6, 2017, 12:57pm UTC](https://discuss.elastic.co/t/restoring-particular-index-from-a-snapshot-using-curator/77502/1 "2017-03-06T12:57:32Z")

</div>

```
   actions:
  1:
    action: restore
    description: >-
      Restore all indices in the most recent snapshot with state SUCCESS. Wait
      for the restore to complete before continuing. Do not skip the repository
      filesystem access check. Use the other options to define the index/shard
      settings for the restore.
    options:
      repository: yaswanth_backup
      # Leaving name blank will result in restoring the most recent snapshot by age
      name: lastone-2017-03-06
      # Leaving indices blank will result in restoring all indices in the snapshot
      indices: mediacontent-2017-02-22
      include_aliases: False
      ignore_unavailable: False
      include_global_state: True
      partial: False
      rename_pattern:
      rename_replacement:
      extra_settings:
      wait_for_completion: True
      skip_repo_fs_check: False
      timeout_override:
      continue_if_exception: False
      disable_action: False
    filters:
    - filtertype: state
      state: SUCCESS
      exclude:

```

The above file is my action file for restoring snapshot for curator. It is throwing error like

```
 2017-03-06 18:38:38,185 ERROR Schema error: not a valid value for dictionary
 value @ data['indices']
Traceback (most recent call last):
  File "c:\python34\lib\site-packages\curator\validators\schemacheck.py", line 5
7, in result
return self.schema(self.config)
  File "c:\python34\lib\site-packages\voluptuous\schema_builder.py", line 192, i
n __call__
return self._compiled([], data)
  File "c:\python34\lib\site-packages\voluptuous\schema_builder.py", line 486, i
n validate_dict
return base_validate(path, iteritems(data), out)
  File "c:\python34\lib\site-packages\voluptuous\schema_builder.py", line 324, i
n validate_mapping
raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: not a valid value for dictionary value @ data[
'indices']

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Python34\Scripts\curator-script.py", line 11, in <module>
load_entry_point('elasticsearch-curator==4.2.6', 'console_scripts', 'curator
')()
  File "c:\python34\lib\site-packages\click\core.py", line 722, in __call__
return self.main(*args, **kwargs)
  File "c:\python34\lib\site-packages\click\core.py", line 697, in main
rv = self.invoke(ctx)
  File "c:\python34\lib\site-packages\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
  File "c:\python34\lib\site-packages\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
  File "c:\python34\lib\site-packages\curator\cli.py", line 126, in cli
action_dict = validate_actions(action_config)
  File "c:\python34\lib\site-packages\curator\utils.py", line 1107, in validate_
actions
loc
  File "c:\python34\lib\site-packages\curator\validators\schemacheck.py", line 6
8, in result
self.test_what, self.location, self.badvalue, self.error)
curator.exceptions.ConfigurationError: Configuration: options: Location: Action
ID "1", action "restore": Bad Value: "mediacontent-2017-02-22", not a valid valu
e for dictionary value @ data['indices']. Check configuration file.

```

When i given the index name in the action file , it is saying that index is not present in my snapshot..I don't know why?

---

<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:** [March 6, 2017, 1:12pm UTC](https://discuss.elastic.co/t/restoring-particular-index-from-a-snapshot-using-curator/77502/3 "2017-03-06T13:12:04Z")

</div>

> [@Yaswanth](#):
>
> ```auto
> - filtertype: ...
> 
> ```

It seems you actually left this in your action file:

> [@Yaswanth](#):
>
> ```auto
> 'module' object has no attribute '...'
> 
> ```

---

<div class="post-metadata">

**Author:** ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)\
**Post date:** [March 6, 2017, 1:14pm UTC](https://discuss.elastic.co/t/restoring-particular-index-from-a-snapshot-using-curator/77502/4 "2017-03-06T13:14:00Z")

</div>

Thanks..for fast response  
that filtertype.. i corrected it  
But when i given the indices name in action file it is showing an error

FYI  
i updated my question

---

<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:** [March 6, 2017, 1:15pm UTC](https://discuss.elastic.co/t/restoring-particular-index-from-a-snapshot-using-curator/77502/5 "2017-03-06T13:15:31Z")

</div>

See [https://www.elastic.co/guide/en/elasticsearch/client/curator/current/option\_indices.html](https://www.elastic.co/guide/en/elasticsearch/client/curator/current/option_indices.html)

`indices` must be a list type.

Try:

```auto
  indices: ['mediacontent-2017-02-22']

```

or

```auto
  indices:
  - mediacontent-2017-02-22

```

---

<div class="post-metadata">

**Author:** ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)\
**Post date:** [March 6, 2017, 1:23pm UTC](https://discuss.elastic.co/t/restoring-particular-index-from-a-snapshot-using-curator/77502/6 "2017-03-06T13:23:36Z")

</div>

Thanks..it worked fine..

IN [quote="Yaswanth, post:1, topic:77502"]  
rename\_pattern:  
rename\_replacement:  
[/quote]

in rename\_pattern can i change the indices name to any other like `data`  
What is rename\_replacement is for..i went through the documentation but i didn't understand clearly?

Can you please put light on that?

Thanks

---

<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:** [March 6, 2017, 1:25pm UTC](https://discuss.elastic.co/t/restoring-particular-index-from-a-snapshot-using-curator/77502/7 "2017-03-06T13:25:32Z")

</div>

That's a different topic. You should ask that in a new topic.

---

<div class="post-metadata">

**Author:** ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)\
**Post date:** [March 6, 2017, 1:27pm UTC](https://discuss.elastic.co/t/restoring-particular-index-from-a-snapshot-using-curator/77502/8 "2017-03-06T13:27:08Z")

</div>

kk..got that

---

<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:** [April 3, 2017, 1:27pm UTC](https://discuss.elastic.co/t/restoring-particular-index-from-a-snapshot-using-curator/77502/9 "2017-04-03T13:27:07Z")

</div>

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