# Curatorのsnapshotからrestoreできない

**URL:** <https://discuss.elastic.co/t/curator-snapshot-restore/74496>\
**Category:** 日本語による質問・議論はこちら\
**Created:** [February 9, 2017, 12:28pm UTC](https://discuss.elastic.co/t/curator-snapshot-restore/74496 "2017-02-09T12:28:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aurantiacus](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@aurantiacus](https://discuss.elastic.co/u/aurantiacus)\
**Post date:** [February 9, 2017, 12:28pm UTC](https://discuss.elastic.co/t/curator-snapshot-restore/74496/1 "2017-02-09T12:28:44Z")

</div>

お世話になります。

定期的にsnapshot取得のため、curatorを検証しています。

snapshot自体は生成できているように見えるのですが、  
curatorからrestoreを実行したときにエラーが発生してしまいます。

ただ、restoreの「name」や「indices」に作成したsnapshot名を設定すると  
エラーで失敗し、両方を空（この場合全てをrestore）にしたら成功します。

ちなみにrestoreの成否は--dry-runで確認しており、  
両方空の場合はcompleteし、「name」「indices」の両方又はどちらかを設定した場合は  
下記のようなエラーメッセージが表示されます。  
※「name」「indices」もどちらも【apps-20170202】

> [root@localhost curator]# curator --config curator.yml --dry-run restore.yml  
> 2017-02-09 21:04:29,193 INFO Preparing Action ID: 1, "restore"  
> 2017-02-09 21:04:29,202 INFO Trying Action ID: 1, "restore": No description given  
> 2017-02-09 21:04:29,241 ERROR Failed to complete action: restore. \<type 'exceptions.KeyError'\>: 'apps-20170202'

助言いただければと思います。  
よろしくお願いいたします。

以下環境及びymlの内容です。  
elasticsearch 2.4.3

↓snapshotの取得時action

```
actions:

      1:
    action: snapshot
    description: >-
      Snapshot apps- prefixed indices older than 1 day (based on index
      creation_date) with the default snapshot name pattern of
      'apps-%Y%m%d%H%M%S'. Wait for the snapshot to complete. Do not skip
      the repository filesystem access check. Use the other options to create
      the snapshot.
    options:
      repository: test
      name: 'apps-%Y%m%d'
      ignore_unavailable: False
      include_global_state: True
      partial: False
      wait_for_completion: True
      skip_repo_fs_check: False
      timeout_override:
      continue_if_exception: False
# disable_action: True
    filters:
    - filtertype: pattern
      kind: prefix
      value: apps-
      exclude:
    - filtertype: age
      source: creation_date
      direction: older
      unit: days
      unit_count: 1
      exclude:

```

↓restoreに成功するaction

```
actions:
  1:
    action: restore
    description: >-
      Restore all indices in the most recent curator-* 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: test
      # Leaving name blank will result in restoring the most recent snapshot by age
      name: 
      # Leaving indices blank will result in restoring all indices in the snapshot
      indices:
      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: pattern
      kind: prefix
      value: apps-
      exclude:
    - filtertype: state
      state: SUCCESS
      exclude:

```

restoreに失敗するaction

```
actions:
  1:
    action: restore
    description: >-
      Restore all indices in the most recent curator-* 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: test
      # Leaving name blank will result in restoring the most recent snapshot by age
      name: apps-20170202
      # Leaving indices blank will result in restoring all indices in the snapshot
      indices:
      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: pattern
      kind: prefix
      value: apps-
      exclude:
    - filtertype: state
      state: SUCCESS
      exclude:

```

---

<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:** [March 9, 2017, 12:29pm UTC](https://discuss.elastic.co/t/curator-snapshot-restore/74496/2 "2017-03-09T12:29:06Z")

</div>

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