Skip to content

Instantly share code, notes, and snippets.

@bly2k
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bly2k/9652596 to your computer and use it in GitHub Desktop.
Save bly2k/9652596 to your computer and use it in GitHub Desktop.
Elasticsearch S3 Snapshot/Restore
Install this plugin on all nodes:
https://github.com/elasticsearch/elasticsearch-cloud-aws
Then in your elasticsearch.yml file (on all nodes), setup your AWS/S3 credentials:
cloud:
aws:
access_key: your_access_key
secret_key: your_secret_key
Then you can create an S3 repository definition:
$ curl -XPUT 'http://localhost:9200/_snapshot/my_s3_repository' -d '{
"type": "s3",
"settings": {
"bucket": "my_bucket_name",
"region": "us-west"
}
}'
Then you can create a snapshot of your data:
$ curl -XPUT "localhost:9200/_snapshot/my_s3_repository/2014_03_19_snapshot?wait_for_completion=true"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment