# Elasticsearch HDFS Snapshot

**URL:** <https://discuss.elastic.co/t/elasticsearch-hdfs-snapshot/277990>\
**Category:** Elastic Community and Ecosystem\
**Created:** [July 6, 2021, 7:14pm UTC](https://discuss.elastic.co/t/elasticsearch-hdfs-snapshot/277990 "2021-07-06T19:14:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![john\_99](https://avatars.discourse-cdn.com/v4/letter/j/bcef8e/32.png) [@john\_99](https://discuss.elastic.co/u/john_99)\
**Post date:** [July 6, 2021, 7:14pm UTC](https://discuss.elastic.co/t/elasticsearch-hdfs-snapshot/277990/1 "2021-07-06T19:14:19Z")

</div>

Hi,

We are using ElasticSearch version 6.8 basic license.

I am making a copy of all indices and some monitoring indices and write and copy of the snapshot into hdfs files.  
Is there a way to automate the snapshot to run once every 24 hours? and add 14 days retention on this snapshot? like after 14 th day I need to clean up the 1st created snapshot?

Any help would be greatly appreciated.

here is my script.(this is creating only once whenever i run this.)  
PUT \_snapshot/test\_hdfs\_repository  
{  
"type": "hdfs",  
"settings": {  
"uri": "hdfs://nn1:8020/",  
"path": "/user/elasticsearch/repositories/test\_hdfs\_repository",  
"conf.ha.zookeeper.quorum": "  
host1:2181,host2:2181,host3:2181",  
"conf.hadoop.http.authentication.simple.anonymous.allowed": "true",  
"conf.hadoop.security.authorization": "false",  
"conf.dfs.domain.socket.path": "/var/lib/hadoop-hdfs/dn\_socket",  
"conf.dfs.ha.namenodes.esdhcluster": "nn1,nn2",  
"conf.dfs.namenode.rpc-address.cluster.nn1": "nn1:8020",  
"conf.dfs.namenode.rpc-address.cluster.nn2": "nn2:8020",  
"conf.dfs.nameservices": "npcluster",  
"conf.dfs.client.failover.proxy.provider.cluster": "org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider",  
"compress": "false",  
"chunk\_size": "10mb"  
}  
}

PUT \_snapshot/test\_hdfs\_repository/snapshot\_full1004?wait\_for\_completion=false  
{  
"include\_global\_state": true  
}

I use to automate this process with the same above command in 6.8. but I don't remember that step now!!

Thank You.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 6, 2021, 7:51pm UTC](https://discuss.elastic.co/t/elasticsearch-hdfs-snapshot/277990/2 "2021-07-06T19:51:23Z")

</div>

If you upgrade to 7.13, you can benefit from this: [Tutorial: Automate backups with SLM | Elasticsearch Guide [7.13] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.13/getting-started-snapshot-lifecycle-management.html)

---

<div class="post-metadata">

**Author:** ![john\_99](https://avatars.discourse-cdn.com/v4/letter/j/bcef8e/32.png) [@john\_99](https://discuss.elastic.co/u/john_99)\
**Post date:** [July 6, 2021, 7:55pm UTC](https://discuss.elastic.co/t/elasticsearch-hdfs-snapshot/277990/3 "2021-07-06T19:55:11Z")

</div>

Hi Dadoonet,

Thanks for your response.

Yes, I am aware of this feature on 7.8. but currently, I am on 6.8. Not sure how to automate this process?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 6, 2021, 8:59pm UTC](https://discuss.elastic.co/t/elasticsearch-hdfs-snapshot/277990/4 "2021-07-06T20:59:33Z")

</div>

I think that curator might help then.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 3, 2021, 8:59pm UTC](https://discuss.elastic.co/t/elasticsearch-hdfs-snapshot/277990/5 "2021-08-03T20:59:53Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
