elastic search snapshot management

80 views
Skip to first unread message

skm

unread,
Oct 16, 2014, 12:35:57 AM10/16/14
to ansible...@googlegroups.com
Hello List

I want to do the following tasks using ansible in elastic search cluster

1. create/verify s3 bucket by the name es_backup
2. create folder in s3 bucket by the name var {{ elasticsearch_cluster_id }}  - s3 module - Can we create folders using s3 module?
3. create repository using that s3 bucket and base_path (folder inside s3 bucket) option - uri module - how to implement the parameters ?

curl -XPOST localhost:9200/_snapshot/my_s3_repository -d ' 
"type": "s3", 
"settings" : { 
   "bucket": "es-backup", 
   "base_path": "logstash_cluster",
   "compress": "true",
   "access_key": "<removed>", 
   "secret_key": "<removed>" 
}
}'

Any hints/examples to help with the above steps is very welcome.

Thanks,
skm

James Martin

unread,
Oct 16, 2014, 11:33:58 AM10/16/14
to ansible...@googlegroups.com
1)
You can create a bucket, take a look at the examples here: http://docs.ansible.com/s3_module.html

2)
There are no such things as "folders" in S3.  Everything is an object or bucket: http://docs.aws.amazon.com/AmazonS3/latest/UG/FolderOperations.html

3) Don't understand the last question.

- James

skm

unread,
Oct 16, 2014, 12:09:19 PM10/16/14
to ansible...@googlegroups.com
Thanks!  

That cleared the confusion.

Other question I have about the snapshot management is that can the elastic search snapshots always run from only one node ? What happens when the node goes down?

What is a good practice for running snapshots as daily cron job.

Thanks,
Skm
Reply all
Reply to author
Forward
0 new messages