Replication on existing index

I an trying to replicate data on an existing index… but it does not work. Below is the example.

Leader has index-1
Follower has index-1
I start replication for index-1 from leader to follower, but replication does not start. Any changes made in docs in leader is not replicated to follower.

But if I delete the index-1 at follower and start replication, it works.
How can I replicate indices existing with same name on both leader and follower?

this bug is known.
More info here: [ERROR] Can't start cross cluster replication - #8 by BlackMetalz

We have to wait while they are working hard for the deadline :smiley:

1 Like

Is there a GitHub issue in OpenSearch for this? If not please do open one.

Thanks for reaching out.

This is intentional behavior. Replication initiation expects the index to not be present on the follower since it bootstraps and populates data. The check is there to avoid accidental loss of data on the follower.

1 Like

Hi ~

I try to " Start replication via Autofollow pattern", as follow

REQUEST

curl -k -u testuser:testuser -XPOST
https://${FOLLOWER}/_opendistro/_replication/_autofollow?pretty”
-H ‘Content-type: application/json’
-d’{“connection”:“leader-cluster”,“pattern”:“leader-*”, “name”:“my-replication”}’

RESPONSE

{
“acknowledged”: true
}

But " Start replication via Autofollow pattern" this function doesn’t seem to work.