Index to file (.json)

Hi,

I have a running Elastic node with an index. I'm constantly inserting documents into the index in a process that I can't stop. I need to 'export' the index to a file (e.g., a .json). I've check alternatives to do this considering snapshots or Elasticdump. However, I cannot use either of them because I don't have the snapshot.repo configured in the elasticsearch.yml (in order to create a snapshot) and I can't install Elasticdump.

Is there any native alternative to export an index into a .json file?

Best regards.

The closest one would be Logstash with the Elasticsearch input and a file output.

Just in case that this could be helpful for anyone. I managed to get the mapping and data of an index using the Elasticsearch Python API (docs). The scan helper described in the documentation is useful when obtaining the data.

For my use case then I upload the json files into an index using Elasticdump.

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