Several question related to Cross-Cluster replication ( awesome feature of Opensearch )

So I follow the documents: Cross-cluster replication - OpenSearch documentation

And I’m able to set up Cross-Cluster Replication ( CCR ) as the document said xD

But there is something still missing from the document:

  • How I can promote replica clusters to main/major cluster ( I assume the whole main cluster die and I want to promote replica cluster for availability )

as document said:

OpenSearch stops replicating *new* indexes that match the pattern, but existing indexes that the rule previously created remain read-only and continue to replicate. If you need to stop existing replication activity and open the indexes up for writes

How I can do the part stop existing replication activity more easy way, example
I have 10 indexes


I tried

POST _plugins/_replication/leader-*/_stop


POST _plugins/_replication/*/_stop

The error appears:

        "type" : "illegal_argument_exception",
        "reason": "No replication in progress for index:*"

I have to run 10 times and manually

POST _plugins/_replication/leader-number-demo/_stop

Also, I have to stop replicating by ( for able to delete replicated index in the follower )

PUT _cluster/settings
    "persistent": {
    "cluster": {
      "remote": {
        "my-connection-alias": {
          "seeds": []


DELETE /_plugins/_replication/_autofollow?pretty
   "leader_alias" : "my-conection-alias",
   "name": "rule-name"


POST _plugins/_replication/leader-number-01/_stop

Thanks for reading :grin:

@Anthony any idea about this :grin:

Hi @BlackMetalz

Process for deleting the index if auto follow is enabled.

  1. Delete auto follow pattern.
  2. Stop the replication.
  3. Delete follower index.

And yes stop replication needs to be called with every index name, it does not support regex.
We understand this involves multiple steps and there is a scope to multiplex stop calls. There are some challenges around permission model in enabling that, however it is worth thinking through in a github issue. Can you please open a github issue with all these details ? CCR devs will engage on it.

Thanks for elaborated post and raising this concern with us :+1:t4:.

1 Like

Thank you, I will create an issue on git. Since this is needed for automation recovery in case whole cluster go down :grin:

Feature request · Issue #344 · opensearch-project/cross-cluster-replication · GitHub :kissing: