Curator snapshot

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

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:

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.

Cool. Worked like charm :slight_smile:

@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

--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.

Thank you.

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