All Products
Search
Document Center

Elasticsearch:Configure a shared OSS repository

Last Updated:Feb 27, 2026

Alibaba Cloud Elasticsearch allows you to configure shared Object Storage Service (OSS) repositories for your cluster. With a shared repository, you can restore data to one cluster from the automatic snapshots of another cluster.

For example, suppose you have two Elasticsearch V6.7.0 clusters: es-cn-a and es-cn-b. The Auto Snapshot feature is enabled for es-cn-a, and an automatic snapshot has been created. To restore the snapshot data to es-cn-b, you configure the OSS repository of es-cn-a as a shared OSS repository on es-cn-b.

Background information

Data backup and restoration for Alibaba Cloud Elasticsearch clusters depend on the elasticsearch-repository-oss plug-in. This plug-in is installed on all Alibaba Cloud Elasticsearch clusters by default and cannot be removed. For more information, see elasticsearch-repository-oss.

Prerequisites

The source and destination Elasticsearch clusters must meet all of the following requirements:

  • The clusters reside in the same region.

  • The clusters belong to the same Alibaba Cloud account.

  • The version of the source cluster is earlier than or the same as that of the destination cluster.

  • If both clusters are V6.7.0 of the Standard Edition, the latest kernel must be used for the clusters. Alternatively, the kernel version of the destination cluster must be later than that of the source cluster.

Important
  • An Elasticsearch cluster can use only the repository for an Elasticsearch cluster of the same or an earlier version.

  • When a cluster uses the repository of an earlier-version cluster, the data format may be incompatible. For example, you can restore an index that has only one document type to an Elasticsearch V6.7.0 cluster from snapshots in the repository of an Elasticsearch V5.5.3 cluster. However, if you restore an index that has multiple document types from the same V5.5.3 repository, an error may occur because Elasticsearch V6.7.0 clusters do not support indices with multiple document types.

Add a shared OSS repository

  1. Log on to the Alibaba Cloud Elasticsearch console.

  2. In the left-side navigation pane, click Elasticsearch Clusters.

  3. Navigate to the desired cluster.

    1. In the top navigation bar, select the resource group to which the cluster belongs and the region where the cluster resides.

    2. On the Elasticsearch Clusters page, find the cluster and click its ID.

  4. In the left-side navigation pane of the page that appears, click Data Backup.

  5. In the Shared OSS Repositories section, click Create Now.

    Note

    If this is not the first time you add a shared OSS repository, click Create Shared Repository.

  6. In the Create Shared Repository dialog box, select an Elasticsearch cluster.

    Important

    The selected cluster must meet the prerequisites listed above.

  7. Click OK.

After the shared repository is added, the page displays the cluster that owns the repository and the repository status.

Important

The system retrieves the repository list based on the selected Elasticsearch cluster. If the cluster is updating its configuration, is in an abnormal state, or is under heavy load, the system may fail to retrieve the repository list. If this happens, log on to the Kibana console of the cluster and run the GET _snapshot command to retrieve the endpoints of all repositories.

Restore indices from a shared repository

Shared OSS repositories are used only to share data between Elasticsearch clusters. You cannot restore data directly from the console. Instead, run the restore commands in the Kibana console of the destination cluster.

The following example shows how to restore the file-2019-08-25 index from the es-cn-a cluster.

Step 1: Open the Kibana console

  1. Log on to the Kibana console of the destination Elasticsearch cluster. For more information, see Log on to the Kibana console.

    Note

    In this example, an Elasticsearch V6.7.0 cluster is used. Operations on clusters of other versions may differ. The actual operations in the console prevail.

  2. In the left-side navigation pane, click Dev Tools.

Step 2: Query available snapshots

On the Console tab, run the following command to query all snapshots in the shared repository:

GET /_cat/snapshots/aliyun_snapshot_from_es-cn-a?v

This command returns the IDs, statuses, and other details of all snapshots in the repository.

Note

aliyun_snapshot_from_es-cn-a is the name of the shared repository that was added in the previous section.

Step 3: Restore indices

Important
  • Before you restore an index, make sure that the destination cluster does not have an index with the same name. If the destination cluster has an index with the same name, make sure that the index is closed. If the index is open, an error occurs during restoration.

  • Indices whose names start with a period (.) are system indices. We recommend that you do not restore these indices. Restoring system indices may cause failures when you access the Kibana console.

Based on the snapshot query results, choose one of the following restore options:

Restore a single index

POST _snapshot/aliyun_snapshot_from_es-cn-a/es-cn-a_20190705220000/_restore
{
  "indices": "file-2019-08-25"
}

Restore multiple indices

POST _snapshot/aliyun_snapshot_from_es-cn-a/es-cn-a_20190705220000/_restore
{
  "indices": "file-2019-08-25,file-2019-08-26"
}

Restore all indices except system indices

POST _snapshot/aliyun_snapshot_from_es-cn-a/es-cn-a_20190705220000/_restore
{
  "indices": "*,-.*"
}