How to allocate replicas to specified nodes

Is there a way to have replicas allocated only to specific nodes?

Why? We are doing an ‘over the wire’ migration from Elasticsearch to OpenSearch and would like the source cluster to remain as the ‘primary’ cluster while data is replicated to OpenSearch.

After joining the destination nodes to the source cluster, we would like to increase replication and have the replicas allocate to the destination nodes and not on other source cluster nodes.

Configuration:

Source - ElasticSearch 6.8
Destination - OpenSearch 1.11

I have tried setting cluster.routing.allocation.awareness.attributes coupled with node.attr. and cluster.routing.allocation.require. however unable to get a split of primary shards on the source nodes and replicas on the destination nodes.

Thanks

How about moving replicas to the specified nodes by reroute api?