Alibaba Cloud Elasticsearch allows you to use snapshots to automate data backup for Elasticsearch clusters. For an Elasticsearch cluster of V7.6 or later, you can configure a snapshot lifecycle management (SLM) policy to enable automatic creation of snapshots for the cluster. For an Elasticsearch cluster of a version earlier than V7.6, you must create a scheduled task on the client that is used to access the cluster to enable automatic creation of snapshots for the cluster. This topic describes how to enable automatic creation of snapshots for an Alibaba Cloud Elasticsearch cluster and store the snapshots to an Alibaba Cloud Object Storage Service (OSS) repository.
Background information
- For more information about SLM, see Snapshot Lifecycle Management.
- The data backup and restoration of Alibaba Cloud Elasticsearch clusters depend on the elasticsearch-repository-oss plug-in. The plug-in is installed on Alibaba Cloud Elasticsearch clusters by default and cannot be removed. For more information about this plug-in, see elasticsearch-repository-oss.
Prerequisites
- OSS is activated, and an OSS bucket is created. For more information, see Activate OSS and Create buckets.
Important The storage class of the OSS bucket must be Standard. Elasticsearch does not support the Archive storage class. In addition, the OSS bucket must reside in the same region as the Elasticsearch cluster.
- A repository that is used to store the created automatic snapshots is created. For
more information, see Create a repository.
Important Before you restore data from a snapshot to a cluster, you must create a repository in the cluster and map the repository to the same OSS endpoint as the snapshot.
Procedure
Elasticsearch cluster of V7.6 or later
Elasticsearch cluster of a version earlier than V7.6
After the automatic snapshots are created and stored to a repository, you can perform operations such as deleting the snapshots, restoring data from the snapshots, and querying restoration information. For more information, see Create manual snapshots and restore data from manual snapshots.