# Snapshot creation using curator 4.2

**URL:** <https://discuss.elastic.co/t/snapshot-creation-using-curator-4-2/75857>\
**Category:** Elasticsearch\
**Created:** [February 21, 2017, 10:13am UTC](https://discuss.elastic.co/t/snapshot-creation-using-curator-4-2/75857 "2017-02-21T10:13:49Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajasekaran\_Mari](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@Rajasekaran\_Mari](https://discuss.elastic.co/u/Rajasekaran_Mari)\
**Post date:** [February 21, 2017, 10:13am UTC](https://discuss.elastic.co/t/snapshot-creation-using-curator-4-2/75857/1 "2017-02-21T10:13:49Z")

</div>

I want to create a snapshot older than 30 days indices using curator 4.2

so i created two curator configuration file :

cat ~/curator\_config.yml

```auto
# Remember, leave a key empty if there is no value. None will be a string, not a Python "NoneType"
client:
  hosts:
    - loclahost.com
  port: 9200
  timeout: 30 logging:
  loglevel: INFO

```

cat ~/action\_file\_snapshot.yml

```auto
---
# Remember, leave a key empty if there is no value. None will be a string, not a Python "NoneType"
#
# Also remember that all examples have 'disable_action' set to True. If you want to use this action as a template, be sure to set 
# this to False after copying it.
actions:
  1:
    action: snapshot
    description: >-
      Snapshot logstash- prefixed indices older than 30 day (based on index
      creation_date) with the default snapshot name pattern of
      'curator-%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:
      # Leaving name blank will result in the default 'curator-%Y%m%d%H%M%S'
      name: s3-backup
      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: logstash-
      exclude:
    - filtertype: age
      source: creation_date
      direction: older
      unit: days
      unit_count: 30
      exclude:

```

After this files creation, i execute this below command

```auto
 curator --config ~/curator_config.yml ~/action_file_snapshot.yml Traceback (most recent call last):                                                                                      
  File "/usr/bin/curator", line 9, in <module>
    load_entry_point('elasticsearch-curator==4.2.6', 'console_scripts', 'curator')()
  File "/usr/lib/python2.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python2.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python2.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/curator/cli.py", line 115, in cli
    client_args = process_config(config)
  File "/usr/lib/python2.6/site-packages/curator/config_utils.py", line 46, in process_config
    config = test_config(yaml_file)
  File "/usr/lib/python2.6/site-packages/curator/config_utils.py", line 9, in test_config
    yaml_config = get_yaml(config)
  File "/usr/lib/python2.6/site-packages/curator/utils.py", line 56, in get_yaml
    'Unable to parse YAML file. Error: {0}'.format(e))
curator.exceptions.ConfigurationError: Unable to parse YAML file. Error: mapping values are not allowed here
  in "<string>", line 6, column 22:
      timeout: 30 logging:

```

I am using curator 4.2 version and this commands execute in elasticsearch master node

```auto
$curator --version
curator, version 4.2.6

```

kindly help me this configuration are correct or not, if wrong kindly correct this configuration files.

---

<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:** [February 21, 2017, 4:06pm UTC](https://discuss.elastic.co/t/snapshot-creation-using-curator-4-2/75857/2 "2017-02-21T16:06:15Z")

</div>

The error:

> [@Rajasekaran\_Mari](#):
>
> ```auto
> curator.exceptions.ConfigurationError: Unable to parse YAML file. Error: mapping values are not allowed here
> 
> ```

Is explained by the configuration here:

> [@Rajasekaran\_Mari](#):
>
> ```auto
> timeout: 30 logging:
> 
> ```

`logging:` should be on its own line, and should be a root-level key in the yaml file.

---

<div class="post-metadata">

**Author:** ![Rajasekaran\_Mari](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@Rajasekaran\_Mari](https://discuss.elastic.co/u/Rajasekaran_Mari)\
**Post date:** [February 22, 2017, 7:21am UTC](https://discuss.elastic.co/t/snapshot-creation-using-curator-4-2/75857/3 "2017-02-22T07:21:32Z")

</div>

ok thank you, now i tried take a snapshot using curator 3.5.1, its working fine. wait i will update you.

---

<div class="post-metadata">

**Author:** ![Rajasekaran\_Mari](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@Rajasekaran\_Mari](https://discuss.elastic.co/u/Rajasekaran_Mari)\
**Post date:** [February 22, 2017, 7:34am UTC](https://discuss.elastic.co/t/snapshot-creation-using-curator-4-2/75857/4 "2017-02-22T07:34:47Z")

</div>

Now i execute following command but ERROR No indices provided WARNING Job did not complete successfully.

]# curator --host [localhost.com](http://localhost.com) snapshot --repository s3-backup indices --time-unit days --older-than 30 --timestring '%Y.%m.%d' --prefix topbeat-  
2017-02-21 23:33:47,860 INFO Job starting: snapshot indices  
2017-02-21 23:33:47,860 INFO Overriding default connection timeout for snapshot action. New timeout: 21600  
2017-02-21 23:33:48,099 INFO Action snapshot will be performed on the following indices: [u'topbeat-2016.12.07', u'topbeat-2016.12.09', u'topbeat-2016.12.10', u'topbeat-2016.12.11', u'topbeat-2016.12.12', u'topbeat-2016.12.15', u'topbeat-2016.12.16', u'topbeat-2016.12.17', u'topbeat-2016.12.18', u'topbeat-2016.12.19', u'topbeat-2016.12.20', u'topbeat-2016.12.21', u'topbeat-2016.12.22', u'topbeat-2016.12.23', u'topbeat-2016.12.24', u'topbeat-2016.12.25', u'topbeat-2016.12.26', u'topbeat-2016.12.27', u'topbeat-2016.12.28', u'topbeat-2016.12.29', u'topbeat-2016.12.30', u'topbeat-2016.12.31', u'topbeat-2017.01.01', u'topbeat-2017.01.02', u'topbeat-2017.01.03', u'topbeat-2017.01.04', u'topbeat-2017.01.05', u'topbeat-2017.01.06', u'topbeat-2017.01.07', u'topbeat-2017.01.08', u'topbeat-2017.01.09', u'topbeat-2017.01.10', u'topbeat-2017.01.11', u'topbeat-2017.01.12', u'topbeat-2017.01.13', u'topbeat-2017.01.14', u'topbeat-2017.01.15', u'topbeat-2017.01.16', u'topbeat-2017.01.17', u'topbeat-2017.01.18', u'topbeat-2017.01.19', u'topbeat-2017.01.20', u'topbeat-2017.01.21', u'topbeat-2017.01.22', u'topbeat-2017.01.23']  
2017-02-21 23:33:48,273 ERROR No indices provided.  
2017-02-21 23:33:48,273 WARNING Job did not complete successfully.

kindly help me

---

<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:** [February 22, 2017, 4:07pm UTC](https://discuss.elastic.co/t/snapshot-creation-using-curator-4-2/75857/5 "2017-02-22T16:07:03Z")

</div>

How did you get from Curator 4.2 to 3.5.1? That's a big regression that you shouldn't be doing unless you're using AWS ES versions 1.5 or 2.3.

---

<div class="post-metadata">

**Author:** ![Rajasekaran\_Mari](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@Rajasekaran\_Mari](https://discuss.elastic.co/u/Rajasekaran_Mari)\
**Post date:** [February 23, 2017, 1:39pm UTC](https://discuss.elastic.co/t/snapshot-creation-using-curator-4-2/75857/6 "2017-02-23T13:39:41Z")

</div>

We are using using curator 3.5.1, Elasticsearch version 2.3.1.

---

<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:** [February 23, 2017, 5:51pm UTC](https://discuss.elastic.co/t/snapshot-creation-using-curator-4-2/75857/7 "2017-02-23T17:51:33Z")

</div>

My first recommendation is to upgrade Curator to 4.2.6, unless you are using AWS ES. Is that the case?

---

<div class="post-metadata">

**Author:** ![Robsi](https://avatars.discourse-cdn.com/v4/letter/r/c6cbf5/32.png) [@Robsi](https://discuss.elastic.co/u/Robsi)\
**Post date:** [March 7, 2017, 4:09pm UTC](https://discuss.elastic.co/t/snapshot-creation-using-curator-4-2/75857/8 "2017-03-07T16:09:52Z")

</div>

HI,

I am using Curator version 3.5.1 and we are trying to set this up on an old Elasticsearch Version 1.1.2.

When I run the following (with --dry-run): curator --dry-run --host 127.0.0.1 snapshot --repository Elasticsearch2-Repo-S3 indices --older-than 53 --time-unit days --timestring '%Y.%m.%d'

It lists several Indices it will Snapshot, However when I run it without --dry-run it fails withthe following:

> 2017-03-07 15:54:48,815 INFO Job starting: snapshot indices  
> 2017-03-07 15:54:48,816 INFO Overriding default connection timeout for snapshot action. New timeout: 21600  
> 2017-03-07 15:54:48,902 INFO Action snapshot will be performed on the following indices: [u'applogs-2017.01.13', u'latencymetrics-2017.01.13', u'preadvicemetrics-2017.01.13']  
> 2017-03-07 15:54:48,917 ERROR No indices provided.  
> 2017-03-07 15:54:48,917 WARNING Job did not complete successfully.

---

<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:** [March 7, 2017, 6:43pm UTC](https://discuss.elastic.co/t/snapshot-creation-using-curator-4-2/75857/9 "2017-03-07T18:43:06Z")

</div>

@Robsi Please open a new topic as your issue is version specific, and this topic is specific to Curator 4.2

---

<div class="post-metadata">

**Author:** ![Robsi](https://avatars.discourse-cdn.com/v4/letter/r/c6cbf5/32.png) [@Robsi](https://discuss.elastic.co/u/Robsi)\
**Post date:** [March 9, 2017, 4:41pm UTC](https://discuss.elastic.co/t/snapshot-creation-using-curator-4-2/75857/10 "2017-03-09T16:41:26Z")

</div>

I have created a new ticket - [Curator 3.5.1 Snapshot issue](https://discuss.elastic.co/t/curator-3-5-1-snapshot-issue/77789)

Could you take alook please

---

<div class="post-metadata">

**Author:** ![Rajasekaran\_Mari](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@Rajasekaran\_Mari](https://discuss.elastic.co/u/Rajasekaran_Mari)\
**Post date:** [March 28, 2017, 1:16pm UTC](https://discuss.elastic.co/t/snapshot-creation-using-curator-4-2/75857/11 "2017-03-28T13:16:32Z")

</div>

Hi,

Now i installed curator 4.2,

Action file

# Remember, leave a key empty if there is no value. None will be a string,

# not a Python "NoneType"

# 

# Also remember that all examples have 'disable\_action' set to True. If you

# want to use this action as a template, be sure to set this to False after

# copying it.

actions:  
1:  
action: snapshot  
description: \>-  
Snapshot logstash- prefixed indices older than 1 day (based on index  
creation\_date) with the default snapshot name pattern of  
'curator-%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: s3\_curator  
# Leaving name blank will result in the default 'curator-%Y%m%d%H%M%S'  
name:  
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: False  
filters:  
- filtertype: pattern  
kind: prefix  
value: logstash-  
exclude:  
- filtertype: age  
source: creation\_date  
direction: older  
unit: days  
unit\_count: 5  
exclude:

config file

# Remember, leave a key empty if there is no value. None will be a string,

# not a Python "NoneType"

client:  
hosts:  
- [elastic.com](http://elastic.com)  
port: 9200  
url\_prefix:  
use\_ssl: False  
certificate:  
client\_cert:  
client\_key:  
ssl\_no\_validate: False  
http\_auth:  
timeout: 30  
master\_only: False

logging:  
loglevel: INFO  
logfile:  
logformat: default  
blacklist: []

when i run this command

$ curator --config config.yml action.yml

thie error came

2017-03-28 06:15:06,865 INFO Preparing Action ID: 1, "snapshot"  
2017-03-28 06:15:06,875 WARNING GET / [status:401 request:0.006s]  
Unable to create client connection to Elasticsearch. Error: TransportError(401, 'security\_exception', 'missing authentication token for REST request [/]')

kindly help me

---

<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:** [March 28, 2017, 2:12pm UTC](https://discuss.elastic.co/t/snapshot-creation-using-curator-4-2/75857/12 "2017-03-28T14:12:45Z")

</div>

That error suggests you have a username and password protected Elasticsearch, and you aren't including them

---

<div class="post-metadata">

**Author:** ![Rajasekaran\_Mari](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@Rajasekaran\_Mari](https://discuss.elastic.co/u/Rajasekaran_Mari)\
**Post date:** [March 28, 2017, 2:15pm UTC](https://discuss.elastic.co/t/snapshot-creation-using-curator-4-2/75857/13 "2017-03-28T14:15:19Z")

</div>

i have one doubt Where to give username password ? in this configuration file or running time .

which server username password ? server or client.

kindly it will help full to me

---

<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:** [March 28, 2017, 3:21pm UTC](https://discuss.elastic.co/t/snapshot-creation-using-curator-4-2/75857/14 "2017-03-28T15:21:19Z")

</div>

In order to log in to Elasticsearch, you have to provide a username and password, yes?

In your curator.yml file, that information goes in the `http_auth` line as follows:

```auto
http_auth: USER:PASS

```

And the username and password are connected by a colon `:` character.

---

<div class="post-metadata">

**Author:** ![Rajasekaran\_Mari](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@Rajasekaran\_Mari](https://discuss.elastic.co/u/Rajasekaran_Mari)\
**Post date:** [March 29, 2017, 5:20am UTC](https://discuss.elastic.co/t/snapshot-creation-using-curator-4-2/75857/16 "2017-03-29T05:20:53Z")

</div>

Hi Sir,

I provided a username and password like this

http\_auth:  
now response happened with error, kindly give a solution of this also

Config.yml:

```auto
client:
  hosts:
    - elas.com
  port: 9200
  url_prefix:
  use_ssl: False
  certificate:
  client_cert:
  client_key:
  ssl_no_validate: False
  http_auth: REDACTED
  timeout: 30
  master_only: False

logging:
  loglevel: INFO
  logfile:
  logformat: default
  blacklist: ['urllib3']

```

error output:

When i run this command:

```auto
$curator --config config.yml action.yml

tbngmanualtest-catalina-log-2017.03.24,tbng-tbngmanualtest-json-log-2017.03.21,tbng-tbngmanualtest-json-log-2017.03.22,tbng-tbngmanualtest-json-log-2017.03.27,tbng-tbngmanualtest-json-log-2017.03.29,topbeat-2017.03.04,topbeat-2017.03.08,topbeat-2017.03.26,topbeat-2017.03.28,undefined-logs-2017.02.14,undefined-logs-2017.02.17,undefined-logs-2017.02.26,undefined-logs-2017.02.27,undefined-logs-2017.03.02,undefined-logs-2017.03.03/_stats/store,docs [status:N/A request:0.002s]
Traceback (most recent call last):
  File "/home/buh/.local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 600, in urlopen
  File "/home/buh/.local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 386, in _make_request
  File "<string>", line 2, in raise_from
  File "/home/buh/.local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 382, in _make_request
  File "/usr/local/lib/python3.5/http/client.py", line 1197, in getresponse
  File "/usr/local/lib/python3.5/http/client.py", line 297, in begin
  File "/usr/local/lib/python3.5/http/client.py", line 266, in _read_status
http.client.RemoteDisconnected: Remote end closed connection without response

```

During handling of the above exception, another exception occurred:

```auto
Traceback (most recent call last):
  File "/home/buh/.local/lib/python3.5/site-packages/elasticsearch/connection/http_urllib3.py", line 95, in perform_request
  File "/home/buh/.local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 649, in urlopen
  File "/home/buh/.local/lib/python3.5/site-packages/urllib3/util/retry.py", line 324, in increment
  File "/home/buh/.local/lib/python3.5/site-packages/urllib3/packages/six.py", line 685, in reraise
  File "/home/buh/.local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 600, in urlopen
  File "/home/buh/.local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 386, in _make_request
  File "<string>", line 2, in raise_from
  File "/home/buh/.local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 382, in _make_request
  File "/usr/local/lib/python3.5/http/client.py", line 1197, in getresponse
  File "/usr/local/lib/python3.5/http/client.py", line 297, in begin
  File "/usr/local/lib/python3.5/http/client.py", line 266, in _read_status
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))

```

---

<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:** [March 29, 2017, 3:16pm UTC](https://discuss.elastic.co/t/snapshot-creation-using-curator-4-2/75857/17 "2017-03-29T15:16:06Z")

</div>

You probably didn't intend to include the actual username and password (if those were), so I edited your post and redacted that portion.

Please encapsulate your code in triple backticks:

````
```
CODE
```

````

It makes the output much more readable.

```auto
http.client.RemoteDisconnected: Remote end closed connection without response

```

and

```auto
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))

```

Both of these suggest your Elasticsearch endpoint may be behind a load balancer, a proxy, or some other gateway. Is that the case? These errors are highly atypical, and those are the only times I can expect to receive such an error.

---

<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:** [April 26, 2017, 3:16pm UTC](https://discuss.elastic.co/t/snapshot-creation-using-curator-4-2/75857/18 "2017-04-26T15:16:10Z")

</div>

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