# elastic search snapshot management

**URL:** <https://forum.ansible.com/t/elastic-search-snapshot-management/16527>\
**Category:** Ansible Project\
**Created:** [October 16, 2014, 4:35am UTC](https://forum.ansible.com/t/elastic-search-snapshot-management/16527 "2014-10-16T04:35:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![skm](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@skm](https://forum.ansible.com/u/skm)\
**Post date:** [October 16, 2014, 4:35am UTC](https://forum.ansible.com/t/elastic-search-snapshot-management/16527/1 "2014-10-16T04:35:56Z")

</div>

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”: “”,  
“secret\_key”: “”  
}  
}’

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

Thanks,  
skm

---

<div class="post-metadata">

**Author:** ![James\_Martin1](https://avatars.discourse-cdn.com/v4/letter/j/0ea827/32.png) [@James\_Martin1](https://forum.ansible.com/u/James_Martin1)\
**Post date:** [October 16, 2014, 3:33pm UTC](https://forum.ansible.com/t/elastic-search-snapshot-management/16527/2 "2014-10-16T15:33:58Z")

</div>

1. 

You can create a bucket, take a look at the examples here: [http://docs.ansible.com/s3\_module.html](http://docs.ansible.com/s3_module.html)

1. 

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](http://docs.aws.amazon.com/AmazonS3/latest/UG/FolderOperations.html)

1. Don’t understand the last question.

- James

---

<div class="post-metadata">

**Author:** ![skm](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@skm](https://forum.ansible.com/u/skm)\
**Post date:** [October 16, 2014, 4:09pm UTC](https://forum.ansible.com/t/elastic-search-snapshot-management/16527/3 "2014-10-16T16:09:19Z")

</div>

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
