I am getting the above error with curator.
> Restore operation can only be performed on snapshots with state "SUCCESS", or "PARTIAL" if partial=True.
My action file is the below
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: testbackup
# If name is blank, the most recent snapshot by age will be selected
name:
# If indices is blank, all indices in the snapshot will be restored
indices:
extra_settings:
index_settings:
number_of_replicas: 0
wait_for_completion: True
max_wait: 3600
wait_interval: 10
filters:
- filtertype: state
state: SUCCESS
exclude: True
and my snapshots look as
elastic@fantastic:/opt/elasticsearch-curator# curl -XGET 192.168.1.12:9200/_snapshot/testbackup/_all?pretty
{
"snapshots" : [
{
"snapshot" : "curator-20170812180638",
"uuid" : "BoJ5pfwqQHmrQlVNHRl2qQ",
"version_id" : 5040099,
"version" : "5.4.0",
"indices" : [
...
...
]
],
"shards" : {
"total" : 995,
"failed" : 380,
"successful" : 615
}
}
]
}
When I am switching the exclude to False such as
- filtertype: state
state: SUCCESS
exclude: False
I am getting back...
2017-08-12 19:37:29,956 DEBUG curator.snapshotlist iterate_filters:479 Parsed filter args: {'filtertype': 'state', 'state': 'SUCCESS', 'exclude': False}
2017-08-12 19:37:29,956 DEBUG curator.utils iterate_filters:488 Filter args: {'state': 'SUCCESS', 'exclude': False}
2017-08-12 19:37:29,956 DEBUG curator.utils iterate_filters:489 Pre-instance: ['curator-20170812180638']
2017-08-12 19:37:29,956 DEBUG curator.snapshotlist filter_by_state:319 Filter by state: Snapshot: curator-20170812180638
2017-08-12 19:37:29,956 DEBUG curator.snapshotlist __not_actionable:51 Snapshot curator-20170812180638 is not actionable, removing from list.
2017-08-12 19:37:29,956 DEBUG curator.utils iterate_filters:491 Post-instance:
2017-08-12 19:37:29,956 ERROR curator.cli cli:187 Unable to complete action "restore". No actionable items in list: <class 'curator.exceptions.NoSnapshots'>
Could someone shed some light? I know that some shards have failed when I snapshotted however is that the case why the restore doesnt work? If thats the problem is there a way to ignore the failed shards and restore the rest?
Thanks in advance
Update1: I also tried the partial: True as below and the same error is coming up
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: testbackup
# If name is blank, the most recent snapshot by age will be selected
name:
partial: True
# If indices is blank, all indices in the snapshot will be restored
indices:
extra_settings:
index_settings:
number_of_replicas: 0
wait_for_completion: True
max_wait: 3600
wait_interval: 10
filters:
- filtertype: state
state: SUCCESS
exclude: True