[newbie here] can't seem to create snapshot using both fs and s3

Hello All,

I am trying to learn elasticsearch by building an app. I wanted to see what snapshots looks like and finally have it in aws elasticsearch with some API gateway on top of it.

It doesn't seem to go as planned. I have the following these versions:

Version: 5.5.1, Build: 19c13d0/2017-07-18T20:44:24.823Z, JVM: 1.8.0_131
ubuntu 16.04.2

File System snapshot

##/etc/elasticsearch/elasticsearch.yml
path.repo: /opt/elasticsearch/backup

My request is:

curl -XPUT 'http://localhost:9200/_snapshot/gontbackup' -H 'Content-Type: application/json' -d '{
 "type": "fs",
  "settings": {
   "compress": true,
   "location": "gontbackup"
  }
}'

The response is shown below but I could not see anything in the folder so I am not sure if it's just taking time(which should not since my data is very small)

 {"acknowledged":true}

S3 Snapshot

I installed the s3 repository elasticserach plugin and created an Admin Access IAM to start with in order to avoid permission issues.

my request is

  curl -XPUT 'http://localhost:9200/_snapshot/gont2106' -H 'Content-Type: application/json' -d '{
    "type": "s3",
    "settings": {
       "bucket": "thebudcke",
       "base_path": "snapshot2016",
       "region": "us-east-1",
       "access_key":"xxx",
       "secret_key": "xxx"
    }
}'


{"error":{"root_cause":[{"type":"repository_exception","reason":"[gont2106] failed to create repository"}],"type":"repository_exception","reason":"[gont2106] failed to create repository","caused_by":{"type":"amazon_s3_exception","reason":"Bad Request (Service: Amazon S3; Status Code: 400; Error Code: 400 Bad Request; Request ID: 176FD5687AA9A2AD)"}},"status":500}

Can anyone help? What does acknowledged do and how to check and what can be wrong with the s3 repository

Thanks

You need to make sure you exactly followed this: https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository-s3-repository.html#repository-s3-permissions

Hi there, thanks for the reply, I think I have done what is expected. I have set in the configuration file the protocol

cloud.aws.s3.protocol: https

I am guessing I am missing something in the settings and from my reading of the article some settings do have default values.

Not sure if the problem is elsewhere because local snapshot isn't working either

I suppose that with the local one you get another exception than amazon_s3_exception, right?

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