# Export Over 4M Data to CSV File on Self-Hosted Cluster

**URL:** https://discuss.elastic.co/t/export-over-4m-data-to-csv-file-on-self-hosted-cluster/272155
**Category:** Kibana
**Tags:** elastic-stack-reporting
**Created:** [May 5, 2021, 9:20am UTC](https://discuss.elastic.co/t/export-over-4m-data-to-csv-file-on-self-hosted-cluster/272155 "2021-05-05T09:20:06Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![kemalkolcuoglu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kemalkolcuoglu/32/88245_2.png) [@kemalkolcuoglu](https://discuss.elastic.co/u/kemalkolcuoglu)
#### Post date: [May 5, 2021, 9:20am UTC](https://discuss.elastic.co/t/export-over-4m-data-to-csv-file-on-self-hosted-cluster/272155/1 "2021-05-05T09:20:06Z")

</div>

Hello Everyone,

I have an issue with Reporting. I need to create a CSV file for our customer and they want to see on file over 4 million records.

I read the [document](https://www.elastic.co/guide/en/kibana/current/reporting-settings-kb.html#reporting-csv-settings) and it says I may set max. bytes with `xpack.reporting.csv.maxSizeBytes` option on `kibana.yml`  
I tested for approx. 1 GB data but It always failed.

So, after the 7.x version, is this option really just enable for Cloud products?

If no, do you guys know how may I export 4.6 million data to a CSV file?

**Platform:** Self-Hosted  
**License:** Basic  
**Elasticsearch & Kibana Version:** 7.7.0

Regards

---

<div class="post-metadata">

### Author: ![Wolfram\_Haussig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfram_haussig/32/70528_2.png) [@Wolfram\_Haussig](https://discuss.elastic.co/u/Wolfram_Haussig)
#### Post date: [May 5, 2021, 9:25am UTC](https://discuss.elastic.co/t/export-over-4m-data-to-csv-file-on-self-hosted-cluster/272155/2 "2021-05-05T09:25:56Z")

</div>

Hi,

Do you have a LogStash instance? You could use an elasticsearch input plugin to read the data you need and use a CSV output plugin to write the file locally.

Best regards  
Wolfram

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [May 5, 2021, 9:49am UTC](https://discuss.elastic.co/t/export-over-4m-data-to-csv-file-on-self-hosted-cluster/272155/3 "2021-05-05T09:49:10Z")

</div>

Welcome to our community! 😃

> [@kemalkolcuoglu](#):
>
> I tested for approx. 1 GB data but It always failed.

Failed how? What do your logs show?

---

<div class="post-metadata">

### Author: ![kemalkolcuoglu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kemalkolcuoglu/32/88245_2.png) [@kemalkolcuoglu](https://discuss.elastic.co/u/kemalkolcuoglu)
#### Post date: [May 5, 2021, 11:21am UTC](https://discuss.elastic.co/t/export-over-4m-data-to-csv-file-on-self-hosted-cluster/272155/4 "2021-05-05T11:21:52Z")

</div>

Oh! Thank you @warkolm I glad to see you 🙂

I got this error:

> Unable to generate report Request Entity Too Large

And @Wolfram_Haussig

Thank you for your reply, I will try to use Logstash. Yes, we have Logstash nodes.

Thanks

---

<div class="post-metadata">

### Author: ![pfnathan](https://avatars.discourse-cdn.com/v4/letter/p/a4c791/32.png) [@pfnathan](https://discuss.elastic.co/u/pfnathan)
#### Post date: [May 5, 2021, 3:16pm UTC](https://discuss.elastic.co/t/export-over-4m-data-to-csv-file-on-self-hosted-cluster/272155/5 "2021-05-05T15:16:12Z")

</div>

Another approach you could take would be to write a quick script to do a search that matches all the records you want, say 1,000 records at a time, then paginate through the results and put them into a CSV file.

---

<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: [June 2, 2021, 3:16pm UTC](https://discuss.elastic.co/t/export-over-4m-data-to-csv-file-on-self-hosted-cluster/272155/6 "2021-06-02T15:16:31Z")

</div>

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