# Curator snapshot

**URL:** <https://discuss.elastic.co/t/curator-snapshot/110612>\
**Category:** Elasticsearch\
**Created:** [December 7, 2017, 5:35am UTC](https://discuss.elastic.co/t/curator-snapshot/110612 "2017-12-07T05:35:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chelambarasan\_CR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chelambarasan_cr/32/62592_2.png) [@Chelambarasan\_CR](https://discuss.elastic.co/u/Chelambarasan_CR)\
**Post date:** [December 7, 2017, 5:35am UTC](https://discuss.elastic.co/t/curator-snapshot/110612/1 "2017-12-07T05:35:52Z")

</div>

Hi ,

I am new to curator and trying to take a snapshot with curator. Below is the action file i used

`
actions:
 1:
action: snapshot
options:
repository: backup      
name: migsnap
ignore_unavailable: True
include_global_state: True
partial: False
wait_for_completion: True
skip_repo_fs_check: False
disable_action: False
filters:
-filtertype: age
source: creation_date
direction: older
unit: days
unit_count: 1
`

Getting the error as below:

D:\Elastic\_local\curator-5.4.0-amd64\>curator --config CONFIG.YML --dry-run ACTION\_FILE.YML  
2017-12-07 10:59:01,395 ERROR Schema error: extra keys not allowed @ data['action']  
Configuration: Actions File: Location: root: Bad Value: "snapshot", extra keys not allowed @ data['action']. Check configuration file.

Please help

---

<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:** [December 7, 2017, 6:05am UTC](https://discuss.elastic.co/t/curator-snapshot/110612/2 "2017-12-07T06:05:56Z")

</div>

For big posts like this, please use the triple back ticks to enclose your pasted code:

````
```
YOUR PASTE HERE
```

````

The error you provided suggests that your action file has some improper indentation. I have reformatted what is above into something that should work:

```auto
actions:
  1:
    action: snapshot
    options:
      repository: backup      
      name: migsnap
      ignore_unavailable: True
      include_global_state: True
      partial: False
      wait_for_completion: True
      skip_repo_fs_check: False
      disable_action: False
    filters:
      - filtertype: age
        source: creation_date
        direction: older
        unit: days
        unit_count: 1

```

Try this and see if it works as expected.

---

<div class="post-metadata">

**Author:** ![Chelambarasan\_CR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chelambarasan_cr/32/62592_2.png) [@Chelambarasan\_CR](https://discuss.elastic.co/u/Chelambarasan_CR)\
**Post date:** [December 7, 2017, 6:21am UTC](https://discuss.elastic.co/t/curator-snapshot/110612/3 "2017-12-07T06:21:17Z")

</div>

Cool. Worked like charm 🙂

---

<div class="post-metadata">

**Author:** ![Chelambarasan\_CR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chelambarasan_cr/32/62592_2.png) [@Chelambarasan\_CR](https://discuss.elastic.co/u/Chelambarasan_CR)\
**Post date:** [December 7, 2017, 7:05am UTC](https://discuss.elastic.co/t/curator-snapshot/110612/4 "2017-12-07T07:05:54Z")

</div>

@theuntergeek Will dry run won't create a snapshot?

GET /\_snapshot/backup/\_all doesn't return any snapshot

but the Snapshot action completed without any error

---

<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:** [December 7, 2017, 1:09pm UTC](https://discuss.elastic.co/t/curator-snapshot/110612/5 "2017-12-07T13:09:23Z")

</div>

`--dry-run` is a dry run, and will not perform the snapshot. It is a test flag to show you what it _would_ do, without actually doing it.

---

<div class="post-metadata">

**Author:** ![Chelambarasan\_CR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chelambarasan_cr/32/62592_2.png) [@Chelambarasan\_CR](https://discuss.elastic.co/u/Chelambarasan_CR)\
**Post date:** [December 7, 2017, 4:17pm UTC](https://discuss.elastic.co/t/curator-snapshot/110612/6 "2017-12-07T16:17:22Z")

</div>

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:** [January 4, 2018, 4:17pm UTC](https://discuss.elastic.co/t/curator-snapshot/110612/7 "2018-01-04T16:17:37Z")

</div>

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