Clone indexes

Hello guys.
Is there a way to clone indexes from one server to another?

Hi,

You can make remote reindex with a cron task, after it depend on the size of your index, how often you want to be up to date etc...

https://www.elastic.co/guide/en/elasticsearch/reference/7.2/reindex-upgrade-remote.html

I clone some indices across different servers and version. I use a script launched each x minutes (depends on the index) then I check if there's data and the reindex didn't return error, if everything look fine i switch the alias and drop the old index. This one is for data that don't receive often update and that can tolerate latency.

There's another solution we use it's when we insert data in a specific index we broadcast to other applications, with a queue etc.... this solution work better for data that need to be synched in short time.

All the solutions here need external tools and code.

Hope it help.

there are two more solutions to this (and as usual, it all depends on the use-case).

You could use snapshot/restore to restore a snapshot from another cluster as long as both have access to the same snapshot repository. See https://www.elastic.co/guide/en/elasticsearch/reference/7.1/modules-snapshots.html

If you need realtime synchronization between two indices, you might want to take a look at cross cluster replication.

All of these solutions have different trade-offs, so make sure you check out the documentation and decide what is best for you.

1 Like

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