Merge 2 Clusters with same name

Hi Team,

Is there any way where we can merge 2 clusters with same name to 1.

Scenario is... will have an existing cluster with name xyz and have some data. Will create additional cluster in different nodes with same name xyz and wont have any data. Can we merge these 2 and have same data fetched from both?

I have tried utilizing the discovery options but its not merging the nodes of other cluster to existing.

Any help is greatly appreciated.


You can use cross cluster search and keep both clusters as they are now.

If you really need to merge the clusters, I'd suggest to do a backup of one of the cluster and restore in the other one. Or do a reindex from remote to reindex existing data from the old to the new one.

Then you can delete the old cluster.

Hi @dadoonet ,

Thanks much for the response . Could you please provide some more details on cross cluster search? Any specific commands ? I know about cross cluster replication but not about cross cluster search.

Post that i can go for remote reindex.

Also once we do cross cluster search .. can we run both the cluster at the same time performing CRUD operations on data?

You can not merge two existing clusters even if they have the same ID. You could however wipe the nodes in the new cluster and set them up to join the other cluster. If there is no data that should be fine.

If you keep these clusters separate you can use cross-cluster search to search across both of them, although they would contain completely separate data sets. An update or insert into one cluster would not propagate to the other but you could serach for the data via cross-cluster search.

Why are you looking to merge clusters? Are the two clusters located far apart?

Hi @Christian_Dahlqvist ,

Yes , we are trying to migrate from one cluster to another without any downtime.

In order to achieve that , we need to have both the clusters UP and running , before i shutdown the old cluster. As i mentioned earlier , i have used discovery options to find out a node which is running in another cluster to join the current cluster, it didnt help.

Logs --
{"type": "server", "timestamp": "2023-03-20T10:40:57,270Z", "level": "WARN", "component": "o.e.c.c.ClusterFormationFailureHelper", "": "elasticsearch", "": "elasticsearch-master-1", "message": "master not discovered or elected yet, an election requires at least 2 nodes with ids from [4R5ELk3GToGBUYXLsr3OCQ, c3YC-9mWRPuv6W-2LbZoCg, 98nCGN8pQDOMfd5tjvhxQA], have only discovered non-quorum [{elasticsearch-master-1}{c3YC-9mWRPuv6W-2LbZoCg}{d6f9peb1Rbe2HaZiAHV9-g}{}{}{ilmr}]; discovery will continue using [x.y.z.1:31777, x.y.z.2:31778, x.y.z.3:31779] from hosts providers and [{elasticsearch-master-1}{c3YC-9mWRPuv6W-2LbZoCg}{d6f9peb1Rbe2HaZiAHV9-g}{}{}{ilmr}] from last-known cluster state; node term 74, last-accepted version 542 in term 74" }

Any Reason why discovery attributes wont work when its multiple clusters?

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