# Elasticsearch copy index data to a file

**URL:** <https://discuss.elastic.co/t/elasticsearch-copy-index-data-to-a-file/194330>\
**Category:** Elasticsearch\
**Created:** [August 7, 2019, 9:12pm UTC](https://discuss.elastic.co/t/elasticsearch-copy-index-data-to-a-file/194330 "2019-08-07T21:12:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikasp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikasp/32/90872_2.png) [@vikasp](https://discuss.elastic.co/u/vikasp)\
**Post date:** [August 7, 2019, 9:12pm UTC](https://discuss.elastic.co/t/elasticsearch-copy-index-data-to-a-file/194330/1 "2019-08-07T21:12:11Z")

</div>

Hi,  
I found the GET api and Multi Get api both definitely requires the id to retrieve the document.

I want to get all the data in the index and save to a file (like a backup of index) without using the snaphost api since because I dont have a shared mountpoint/s3/azure/hdfs.

Is there any Curl command for to just get all the docs in an index.  
or a python with elasticsearch client to get all the docs in an index.

I found elasticsearch-dump. But Please help me out with finding in curl/python.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [August 9, 2019, 6:04am UTC](https://discuss.elastic.co/t/elasticsearch-copy-index-data-to-a-file/194330/2 "2019-08-09T06:04:37Z")

</div>

take a look at the [Search Scroll API](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/7.3/java-rest-high-search-scroll.html)

---

<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:** [September 6, 2019, 6:04am UTC](https://discuss.elastic.co/t/elasticsearch-copy-index-data-to-a-file/194330/3 "2019-09-06T06:04:44Z")

</div>

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