How can I migrate from elasticsearch to postgresql?

I have to migrate from elasticsearch to postgresql.

What is the best way to do that?

I found this plugin: Elasticsearch output plugin | Logstash Reference [7.14] | Elastic

Is it useful for my purpose?

Thanks :slight_smile:

So you have your data in Elasticsearch and you want to store them in Postgresql, right?

Do you want to do both or just keep Postgresql?
If the former, I'd recommend modifying the application layer if possible and send data to elasticsearch in the same "transaction" as you are sending your data to the database.

I shared most of my thoughts there: Advanced Search for Your Legacy Application - -Xmx128gb -Xms128gb

Have also a look at this "live coding" recording.

If you just want to move the data, you should IMHO write a script which does that.
basically read all the data from Elasticsearch using the scroll API and transform the JSON documents to whatever datastructure you want and store in the database.

1 Like

I want to move the data. Ok so I need a script. Thanks :slight_smile:

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