cinhtau / curly-telegram

Comments what else? :scream: :see_no_evil: :hear_no_evil: :speak_no_evil:
0 stars 0 forks source link

http://cinhtau.net/2017/01/17/backup-your-elasticsearch-data-with-amazon-s3/ #2

Open utterances-bot opened 5 years ago

utterances-bot commented 5 years ago

Backup your Elasticsearch data with Amazon S3

As I mentioned before, how easy it is to backup your Elasticsearch data with the snapshot and restore API, today’s post demonstrates how to backup the data t...

http://cinhtau.net/2017/01/17/backup-your-elasticsearch-data-with-amazon-s3/

Dev393 commented 5 years ago

Hi @TAN-VINH NGUYEN,

I am following this article for my hosted elasticsearch infra, I have connection from my hosted environment to AWS.

If i try the below command:

PUT _snapshot/_snapshot { "type": "s3", "settings": { "bucket": "bucketname", "compress": true, "region": "eu-west-1" } }

It says an error below:

{ "error": { "root_cause": [ { "type": "repository_verification_exception", "reason": "[_snapshot] path is not accessible on master node" } ], "type": "repository_verification_exception", "reason": "[_snapshot] path is not accessible on master node", "caused_by": { "type": "i_o_exception", "reason": "Unable to upload object [tests-le_4s48bQcK1U3QmPgRJ8A/master.dat] using a single upload", "caused_by": { "type": "sdk_client_exception", "reason": "sdk_client_exception: The requested metadata is not found at http://169.254.169.254/latest/meta-data/iam/security-credentials/" } } }, "status": 500 }

can you guide me how to proceed here?

cinhtau commented 5 years ago

Please format code with Markdown. :wink:

cinhtau commented 5 years ago

You can not name the snapshot repository _snapshot. That is what you have tried in above command.

[_snapshot] path is not accessible on master node

To create a snapshot repository names s3

PUT _snapshot/s3
{
  "type": "s3",
  "settings": {
     "bucket": "enter your bucketname",
     "compress": true,
     "region": "change this to your region of the bucket"
   }
}
Dev393 commented 5 years ago

Tried that as well.

Matrix7867 commented 5 years ago

@cinhtau Thanks for the great article!! helped me a lot. Can you also help me how to restore the same indices in any new cluster of ES?

cinhtau commented 5 years ago

@Matrix7867 Hi, thank you for your feedback. I do not do consulting in working hours, but I could write a follow up article. Basically it is these steps:

curl -X POST "localhost:9200/_snapshot/my_backup/snapshot_1/_restore?pretty"