# Cloud-aws plugin with ceph bug?

**URL:** <https://discuss.elastic.co/t/cloud-aws-plugin-with-ceph-bug/42036>\
**Category:** Elasticsearch\
**Created:** [February 17, 2016, 3:09pm UTC](https://discuss.elastic.co/t/cloud-aws-plugin-with-ceph-bug/42036 "2016-02-17T15:09:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![zilva](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zilva/32/12639_2.png) [@zilva](https://discuss.elastic.co/u/zilva)\
**Post date:** [February 17, 2016, 3:09pm UTC](https://discuss.elastic.co/t/cloud-aws-plugin-with-ceph-bug/42036/1 "2016-02-17T15:09:19Z")

</div>

Hello,

I want to be able to create backup and restore using backup from ceph. I am using elasticsearch 2.0.

**To create backup I use these steps:**  
create repository:  
curl -XPUT '[http://localhost:9200/\_snapshot/ceph\_repository](http://localhost:9200/_snapshot/ceph_repository)' -d '{"type": "s3", "settings": { "bucket": "mybucket", "endpoint": "[myendpoint.com](http://myendpoint.com)", "protocol":"http", "access\_key": "my\_access\_key", "secret\_key": "my\_secret\_key", "base\_path": "my/base/path" }}'

to create backup  
curl -XPUT '[http://localhost:9200/\_snapshot/ceph\_repository/snap1?wait\_for\_completion=true](http://localhost:9200/_snapshot/ceph_repository/snap1?wait_for_completion=true)'

which outputs json containing "status":"SUCCESS" and files are created in ceph bucket.

**To restore I use these steps:**  
Delete elastic search data directory and restart elastic search (after restarting cluster health gives "status" : "green").

Create repository using previously used command.  
Restore using ceph snapshot:  
curl -XPOST '[http://localhost:9200/\_snapshot/ceph\_repository/snap1/\_restore](http://localhost:9200/_snapshot/ceph_repository/snap1/_restore)'

and this gives an error:  
{"error":{"root\_cause":[{"type":"amazon\_s3\_exception","reason":"null (Service: Amazon S3; Status Code: 400; Error Code: InvalidArgument; Request ID: null)"}],"type":"amazon\_s3\_exception","reason":"null (Service: Amazon S3; Status Code: 400; Error Code: InvalidArgument; Request ID: null)"},"status":500}

**Trying to debug:**  
curl -XGET '[http://localhost:9200/\_snapshot/\_all](http://localhost:9200/_snapshot/_all)'  
gives:  
{"ceph\_repository":{"type":"s3","settings":{"bucket":"mybucket","base\_path":"my/base/path","endpoint":"[myendpoint.com](http://myendpoint.com)","protocol":"http"}}}

curl -XGET '[http://localhost:9200/\_snapshot/\_status](http://localhost:9200/_snapshot/_status)'  
gives:  
{"snapshots":[]}

curl -XGET '[http://localhost:9200/\_snsitory/snap1/\_status](http://localhost:9200/_snsitory/snap1/_status)'  
gives:  
{"error":{"root\_cause":[{"type":"amazon\_s3\_exception","reason":"null (Service: Amazon S3; Status Code: 400; Error Code: InvalidArgument; Request ID: null)"}],"type":"amazon\_s3\_exception","reason":"null (Service: Amazon S3; Status Code: 400; Error Code: InvalidArgument; Request ID: null)"},"status":500}

I ommited elasticsearch.yml config since there is no configuration related to cloud-aws plugin.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 17, 2016, 3:50pm UTC](https://discuss.elastic.co/t/cloud-aws-plugin-with-ceph-bug/42036/2 "2016-02-17T15:50:09Z")

</div>

I think it has been fixed in 2.1.0. with this PR: [https://github.com/elastic/elasticsearch/pull/13360](https://github.com/elastic/elasticsearch/pull/13360)

And this doc: [https://www.elastic.co/guide/en/elasticsearch/plugins/current/cloud-aws-usage.html#cloud-aws-usage-signer](https://www.elastic.co/guide/en/elasticsearch/plugins/current/cloud-aws-usage.html#cloud-aws-usage-signer)

---

<div class="post-metadata">

**Author:** ![zilva](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zilva/32/12639_2.png) [@zilva](https://discuss.elastic.co/u/zilva)\
**Post date:** [February 17, 2016, 4:00pm UTC](https://discuss.elastic.co/t/cloud-aws-plugin-with-ceph-bug/42036/3 "2016-02-17T16:00:57Z")

</div>

I will try to repeat those actions with latest (2.2) version of elasticsearch. I am curious on how my settings should look like. Currently I do not use any of the cloud-aws plugin settings in my elasticsearch.yml config because of these reasons:  
cloud.aws - is not used because I do not use any of amazon web services.  
repositories.s3 - because I don't really know what is the purpose of it (since you still need to create repositories manually).

---

<div class="post-metadata">

**Author:** ![zilva](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zilva/32/12639_2.png) [@zilva](https://discuss.elastic.co/u/zilva)\
**Post date:** [February 17, 2016, 4:26pm UTC](https://discuss.elastic.co/t/cloud-aws-plugin-with-ceph-bug/42036/4 "2016-02-17T16:26:38Z")

</div>

Even after changing version to 2.2 after snapshot is uploaded to ceph command:

curl -XGET '[http://localhost:9200/\_snapshot/ceph\_repository/snap1/\_status](http://localhost:9200/_snapshot/ceph_repository/snap1/_status)'

gives:  
{  
"error": {  
"reason": "null (Service: Amazon S3; Status Code: 400; Error Code: InvalidArgument; Request ID: null)",  
"root\_cause": [  
{  
"reason": "null (Service: Amazon S3; Status Code: 400; Error Code: InvalidArgument; Request ID: null)",  
"type": "amazon\_s3\_exception"  
}  
],  
"type": "amazon\_s3\_exception"  
},  
"status": 500  
}

---

<div class="post-metadata">

**Author:** ![zilva](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zilva/32/12639_2.png) [@zilva](https://discuss.elastic.co/u/zilva)\
**Post date:** [February 18, 2016, 7:21am UTC](https://discuss.elastic.co/t/cloud-aws-plugin-with-ceph-bug/42036/5 "2016-02-18T07:21:12Z")

</div>

I was missing correct signer type:  
`"signer": "S3SignerType"`  
Thanks for help!

---

<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 5, 2017, 11:15pm UTC](https://discuss.elastic.co/t/cloud-aws-plugin-with-ceph-bug/42036/6 "2017-07-05T23:15:25Z")

</div>


