# Error using Curator 5.1.1 to restore snapshot

**URL:** <https://discuss.elastic.co/t/error-using-curator-5-1-1-to-restore-snapshot/90527>\
**Category:** Elasticsearch\
**Created:** [June 22, 2017, 7:57pm UTC](https://discuss.elastic.co/t/error-using-curator-5-1-1-to-restore-snapshot/90527 "2017-06-22T19:57:23Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jaff](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaff/32/18382_2.png) [@Jaff](https://discuss.elastic.co/u/Jaff)\
**Post date:** [June 22, 2017, 7:57pm UTC](https://discuss.elastic.co/t/error-using-curator-5-1-1-to-restore-snapshot/90527/1 "2017-06-22T19:57:23Z")

</div>

jenkins@592a48b3b882:~$ curator --config /tmp/config/es5-lineartv\_dev.yml /tmp/actions/restore-lineartv\_dev.yml  
{"@timestamp": "2017-06-22T19:55:41.694Z", "function": "cli", "linenum": 153, "loglevel": "INFO", "message": "Preparing Action ID: 1, "restore"", "name": "curator.cli"}  
Traceback (most recent call last):  
File "/usr/local/bin/curator", line 9, in   
load\_entry\_point('elasticsearch-curator==5.1.1', 'console\_scripts', 'curator')()  
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in **call**  
return self.main(\*args, \*\*kwargs)  
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main  
rv = self.invoke(ctx)  
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke  
return ctx.invoke(self.callback, \*\*ctx.params)  
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke  
return callback(\*args, \*\*kwargs)  
File "/usr/local/lib/python2.7/dist-packages/curator/cli.py", line 167, in cli  
client = get\_client(\*\*client\_args)  
File "/usr/local/lib/python2.7/dist-packages/curator/utils.py", line 788, in get\_client  
'Error: {0}'.format(e)  
elasticsearch.exceptions.ElasticsearchException: Unable to create client connection to Elasticsearch. Error: 'Session' object has no attribute 'merge\_environment\_settings'

---

<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:** [June 22, 2017, 9:49pm UTC](https://discuss.elastic.co/t/error-using-curator-5-1-1-to-restore-snapshot/90527/2 "2017-06-22T21:49:23Z")

</div>

How was Curator installed, on what platform?

---

<div class="post-metadata">

**Author:** ![Jaff](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaff/32/18382_2.png) [@Jaff](https://discuss.elastic.co/u/Jaff)\
**Post date:** [June 22, 2017, 10:56pm UTC](https://discuss.elastic.co/t/error-using-curator-5-1-1-to-restore-snapshot/90527/3 "2017-06-22T22:56:24Z")

</div>

It's a docker image, on Ubuntu 14.04.4, installed with pip:

RUN apt-get update && apt-get -y install python-pip python-dev && pip install elasticsearch-curator==5.1.1 requests-aws4auth

---

<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:** [June 23, 2017, 12:37am UTC](https://discuss.elastic.co/t/error-using-curator-5-1-1-to-restore-snapshot/90527/4 "2017-06-23T00:37:06Z")

</div>

Hmmm. Please uninstall that from pip and try the bundled version from the [APT Repository](https://www.elastic.co/guide/en/elasticsearch/client/curator/current/apt-repository.html). There's also a direct download of the DEB package available.

---

<div class="post-metadata">

**Author:** ![Jaff](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaff/32/18382_2.png) [@Jaff](https://discuss.elastic.co/u/Jaff)\
**Post date:** [June 23, 2017, 7:04pm UTC](https://discuss.elastic.co/t/error-using-curator-5-1-1-to-restore-snapshot/90527/5 "2017-06-23T19:04:48Z")

</div>

I installed from deb package, now getting error about repository not found:  
root@20dd6ee047da:/# curator --config /tmp/config/config.yml /tmp/actions/restore-snapshots-lineartv\_dev.yml  
{"@timestamp": "2017-06-23T19:01:30.217Z", "function": "cli", "linenum": 153, "loglevel": "INFO", "message": "Preparing Action ID: 1, "restore"", "name": "curator.cli"}  
{"@timestamp": "2017-06-23T19:01:33.498Z", "function": "cli", "linenum": 174, "loglevel": "INFO", "message": "Trying Action ID: 1, "restore": restore airings-v7", "name": "curator.cli"}  
{"@timestamp": "2017-06-23T19:01:34.536Z", "function": "cli", "linenum": 193, "loglevel": "ERROR", "message": "Failed to complete action: restore. \<class 'curator.exceptions.FailedExecution'\>: Unable to verify existence of repository [repository-name-redacted]", "name": "curator.cli"}

---

<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:** [June 23, 2017, 7:26pm UTC](https://discuss.elastic.co/t/error-using-curator-5-1-1-to-restore-snapshot/90527/6 "2017-06-23T19:26:06Z")

</div>

That message can mean that the repository was not created properly, or that it is not fully accessible. Each master _and_ data node must have full read/write access to the same shared mount point path for `fs` type repositories (`path.data` in `elasticsearch.yml`). Or each master and data node must have read/write access to the same remote file share (`s3`, `azure`, `hdfs`). For these mount point types, this means that each master and data node has the appropriate repository plugin installed and properly configured.

If you're satisfied that these conditions are met, you can proceed with this test step.

What happens if you run:

```auto
$ curator_cli --config /tmp/config/config.yml show_snapshots --repository repository_name_redacted

```

This will log to the same place (or stdout), but will show all snapshots in the repository. If the same error persists, and you're certain that all of the above conditions have been met, let's talk again.

---

<div class="post-metadata">

**Author:** ![Jaff](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaff/32/18382_2.png) [@Jaff](https://discuss.elastic.co/u/Jaff)\
**Post date:** [June 23, 2017, 7:33pm UTC](https://discuss.elastic.co/t/error-using-curator-5-1-1-to-restore-snapshot/90527/7 "2017-06-23T19:33:51Z")

</div>

> [@theuntergeek](#):
>
> $

Looks like the error came about because I was trying to restore snapshots created on dev into test environment. If I use dev config, I do get a list of snapshots.

Seeing that result, wondering if it is possible to transfer index snapshots across environments. Or does that not even make sense? I guess it depends on what the search indices are collecting...

---

<div class="post-metadata">

**Author:** ![Jaff](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaff/32/18382_2.png) [@Jaff](https://discuss.elastic.co/u/Jaff)\
**Post date:** [June 23, 2017, 7:37pm UTC](https://discuss.elastic.co/t/error-using-curator-5-1-1-to-restore-snapshot/90527/8 "2017-06-23T19:37:37Z")

</div>

I'm also confused about setting up action files, in particular for filtering indices. Is there a way to snapshot all indices ? Currently my action file needs to specify indices by type, of which there are four for one cluster, and 1 for a different one.

---

<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:** [June 26, 2017, 2:16pm UTC](https://discuss.elastic.co/t/error-using-curator-5-1-1-to-restore-snapshot/90527/9 "2017-06-26T14:16:35Z")

</div>

> [@Jaff](#):
>
> wondering if it is possible to transfer index snapshots across environments.

It is not, as you have described it. The way to accomplish what you want, though, is to have the identical repository added to both clusters. Follow the steps to create the repository (including having the same mount points on both clusters) on both clusters, and then you will be able to snapshot in one, and restore to the other. **Do not, under any circumstances, snapshot to the same repository from both clusters.** This functionality should only ever be used to migrate data, or bring them into harmony. You should not snapshot from the target environment into the "source" environment's repository. You should have a separate repository for the target environment.

> [@Jaff](#):
>
> Is there a way to snapshot all indices ?

Yes. It's as simple as this:

```yaml
filters:
- filtertype: none

```

This uses _no_ filters, ensuring that _all_ indices are selected.

---

<div class="post-metadata">

**Author:** ![Jaff](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaff/32/18382_2.png) [@Jaff](https://discuss.elastic.co/u/Jaff)\
**Post date:** [June 26, 2017, 8:50pm UTC](https://discuss.elastic.co/t/error-using-curator-5-1-1-to-restore-snapshot/90527/10 "2017-06-26T20:50:15Z")

</div>

Great, now I understand.

One more thing, why can I not run curator\_cli to perform a snapshot-restore function? I see the list of commands available as:  
Commands:  
allocation Shard Routing Allocation  
close Close indices  
delete\_indices Delete indices  
delete\_snapshots Delete snapshots  
forcemerge forceMerge index/shard segments  
open Open indices  
replicas Change replica count  
show\_indices Show indices  
show\_snapshots Show snapshots  
snapshot Snapshot indices

---

<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:** [June 26, 2017, 10:23pm UTC](https://discuss.elastic.co/t/error-using-curator-5-1-1-to-restore-snapshot/90527/11 "2017-06-26T22:23:35Z")

</div>

There are a lot of complex options for the restore action. I did not want to add them all. If someone wants to submit a PR adding that functionality, and it looks good, then I'd probably merge it.

---

<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:** [July 24, 2017, 10:23pm UTC](https://discuss.elastic.co/t/error-using-curator-5-1-1-to-restore-snapshot/90527/12 "2017-07-24T22:23:39Z")

</div>

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