Restoring particular index from a snapshot using Curator?

    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.
      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
      wait_for_completion: True
      skip_repo_fs_check: False
      continue_if_exception: False
      disable_action: False
    - filtertype: state
      state: SUCCESS

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\", line 5
7, in result
return self.schema(self.config)
  File "c:\python34\lib\site-packages\voluptuous\", line 192, i
n __call__
return self._compiled([], data)
  File "c:\python34\lib\site-packages\voluptuous\", line 486, i
n validate_dict
return base_validate(path, iteritems(data), out)
  File "c:\python34\lib\site-packages\voluptuous\", line 324, i
n validate_mapping
raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: not a valid value for dictionary value @ data[

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Python34\Scripts\", line 11, in <module>
load_entry_point('elasticsearch-curator==4.2.6', 'console_scripts', 'curator
  File "c:\python34\lib\site-packages\click\", line 722, in __call__
return self.main(*args, **kwargs)
  File "c:\python34\lib\site-packages\click\", line 697, in main
rv = self.invoke(ctx)
  File "c:\python34\lib\site-packages\click\", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
  File "c:\python34\lib\site-packages\click\", line 535, in invoke
return callback(*args, **kwargs)
  File "c:\python34\lib\site-packages\curator\", line 126, in cli
action_dict = validate_actions(action_config)
  File "c:\python34\lib\site-packages\curator\", line 1107, in validate_
  File "c:\python34\lib\site-packages\curator\validators\", 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?

It seems you actually left this in your action file:

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

i updated my question


indices must be a list type.


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


  - mediacontent-2017-02-22
1 Like worked fine..

IN [quote="Yaswanth, post:1, topic:77502"]

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?


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

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