Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
utterances-bot opened this issue Jun 18, 2019 · 6 comments

Comments

@utterances-bot
Copy link

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/

Copy link

Dev393 commented Jun 18, 2019

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
Copy link
Owner

cinhtau commented Jun 18, 2019

Please format code with Markdown. 😉

@cinhtau
Copy link
Owner

cinhtau commented Jun 18, 2019

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"
   }
}

Copy link

Dev393 commented Jun 18, 2019

Tried that as well.

Copy link

@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
Copy link
Owner

cinhtau commented Aug 14, 2019

@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:

  • Install aws-s3 plugin in new Elasticsearch installation
  • Add existing snapshot repository to new Elasticsearch cluster
  • Verify that you can see the backups/snapshots
  • Restore the backup with the restore API
curl -X POST "localhost:9200/_snapshot/my_backup/snapshot_1/_restore?pretty"

Repository owner deleted a comment from Dev393 Sep 8, 2020
Repository owner deleted a comment from Dev393 Sep 8, 2020
Repository owner deleted a comment from Dev393 Sep 8, 2020
Repository owner deleted a comment from Dev393 Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants