Updated on 2024-07-02 GMT+08:00

Synchronizing Specified Indexes

Synchronize a single index.

The request URL and request body parameters are as follows:

PUT start_remote_sync
Table 1 Request body parameters

Parameter

Description

remote_cluster

Name of the primary cluster. The default name is leader1. You can change the name by configuring the primary cluster information.

remote_index

Name of the index to be synchronized in the primary cluster

local_index

Index name in the secondary cluster

settings

Index settings to be synchronized

During synchronization, indexes in the secondary cluster become read-only. The synchronization is performed periodically.

The following are two examples:

  1. Synchronize a single index from the primary cluster to the secondary cluster.
    PUT start_remote_sync
    {
      "remote_cluster": "leader1",
      "remote_index": "data1_leader",
      "local_index": "data1_follower"
    }
  2. Synchronize a single index from the primary cluster to the secondary cluster and modify the index configurations.
    PUT start_remote_sync
    {
      "remote_cluster": "leader1",
      "remote_index": "data1_leader",
      "local_index": "data1_follower",
      "settings": {
        "number_of_replicas": 4
      }
    }

    The following index configurations cannot be modified:

    • number_of_shards
    • version.created
    • uuid
    • creation_date
    • soft_deletes.enabled