# How to take elasticsearch index backup to HDFS

**URL:** <https://discuss.elastic.co/t/how-to-take-elasticsearch-index-backup-to-hdfs/199241>\
**Category:** Elasticsearch\
**Created:** [September 12, 2019, 11:15am UTC](https://discuss.elastic.co/t/how-to-take-elasticsearch-index-backup-to-hdfs/199241 "2019-09-12T11:15:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sundarcse1216](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sundarcse1216/32/29349_2.png) [@sundarcse1216](https://discuss.elastic.co/u/sundarcse1216)\
**Post date:** [September 12, 2019, 11:15am UTC](https://discuss.elastic.co/t/how-to-take-elasticsearch-index-backup-to-hdfs/199241/1 "2019-09-12T11:15:34Z")

</div>

Hi All,

Good day all..

I want to take elasticsearch index backup and store into HDFS. Can anyone please help me?

Thanks,  
Sundar.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 13, 2019, 5:53am UTC](https://discuss.elastic.co/t/how-to-take-elasticsearch-index-backup-to-hdfs/199241/2 "2019-09-13T05:53:16Z")

</div>

Have you looked at the [snapshot and restore functionality](https://www.elastic.co/guide/en/elasticsearch/reference/7.3/modules-snapshots.html) and the [HDFS snapshot plugin](https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository-hdfs.html)?

---

<div class="post-metadata">

**Author:** ![sundarcse1216](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sundarcse1216/32/29349_2.png) [@sundarcse1216](https://discuss.elastic.co/u/sundarcse1216)\
**Post date:** [September 13, 2019, 6:10am UTC](https://discuss.elastic.co/t/how-to-take-elasticsearch-index-backup-to-hdfs/199241/3 "2019-09-13T06:10:51Z")

</div>

Thanks for your response.

Yes we installed **repository-hdfs** plugin in all node in the cluster and restarted.

When we send snapshot request it throwing error response.

Request:

```
     PUT _snapshot/my_hdfs_repository
         {
         "type": "hdfs",
         "settings": {
         "uri": "hdfs://xxxxxxxx:12345/",
         "path": "/dev/test/snapshot",
         "security.principal": "abc@TEST-xyv.COM"
     }
  }

```

Response:

`{ "error" : { "root_cause" : [{ "type" : "repository_exception", "reason" : "[my_hdfs_repository] failed to create repository" } ], "type" : "repository_exception", "reason" : "[my_hdfs_repository] failed to create repository", "caused_by" : { "type" : "unchecked_i_o_exception", "reason" : "Cannot create HDFS repository for uri [hdfs://yyyyyyy:12345/ "caused_by" : { "type" : "i_o_exception", "reason" : "Failed on local exception: java.io.IOException: org.apache.h s : local host is: \"xxxxxxxx.server.net/xx.yyyy.zz.qq\"; destination host is "caused_by" : { "type" : "i_o_exception", "reason" : " **org.apache.hadoop.ipc.RpcException** : RPC response exceeds m "caused_by" : { "type" : "rpc_exception", "reason" : "RPC response exceeds maximum data length" } } } } }, "status" : 500 }`

Please help me to resolve this issue. Thanks in advance.

---

<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:** [October 11, 2019, 6:24am UTC](https://discuss.elastic.co/t/how-to-take-elasticsearch-index-backup-to-hdfs/199241/4 "2019-10-11T06:24:21Z")

</div>

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