Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Creating a Snapshot to Back Up the Data of an Elasticsearch Cluster

Updated on 2025-01-23 GMT+08:00

This topic describes two ways to create a snapshot to back up a CSS cluster: automatic and manual.

Constraints

  • Snapshots cannot be created for clusters that were created before March 10, 2018.
  • Cluster snapshots will increase CPU usage and disk I/O. You are advised to take cluster snapshots during off-peak hours.
  • If a cluster is in the Unavailable state, you can use the cluster snapshot function only to restore the cluster or view snapshot information.
  • While you are creating a snapshot for a cluster or restoring it using one, you can perform certain operations, including scaling out the cluster (except when the cluster is the destination of a restoration operation), accessing Kibana, viewing metrics, and deleting other snapshots. However, you cannot perform the following operations: restarting or deleting the cluster, deleting a snapshot that is in the Creating or Restoring state, and creating or restoring another snapshot. While a snapshot is being created or restored for a cluster, any automatic snapshot creation task initiated for that cluster will be canceled.
  • The first snapshot of a cluster is a full snapshot, and subsequent snapshots are incremental snapshots. CSS snapshot files depend on each other.
  • In a cluster where storage and compute are decoupled, an index that is both frozen and closed cannot be backed up.

Prerequisites

  • You have created an OBS bucket for storing snapshots. Storing snapshots in an OBS bucket may incur additional fees. For details, see OBS Billing Overview.

Setting Automatic Snapshot Creation

  1. Log in to the CSS management console.
  2. Enable automatic snapshot creation for a cluster. You can enable automatic snapshot creation when creating a new cluster. For details, see 7. Alternatively, you can do that for an existing cluster.
    • If automatic snapshot creation has been enabled during cluster creation, go to 7.
    • To enable automatic snapshot creation after a cluster is already created, go to the next step.
  3. On the Clusters page, click the name of the target cluster. In the navigation pane on the left, choose Cluster Snapshots.

    Alternatively, on the Clusters page, locate the row that contains the target cluster and click More > Back Up and Restore in the Operation column to switch to the Cluster Snapshots page.

  4. On the displayed Cluster Snapshots page, click the icon to the right of Cluster Snapshot to enable the cluster snapshot function. If it is already enabled, skip this step.

    CSS will automatically create an OBS bucket and IAM agency for snapshot storage. The automatically created OBS bucket and IAM agency will be displayed on the page.

    To modify them, click on the right of Basic Configuration to edit the configuration. After the OBS bucket is changed, the cluster obtains snapshot data from the new bucket.

    Table 1 Basic configuration for a cluster snapshot policy

    Parameter

    Description

    OBS Bucket

    Select an OBS bucket for storing snapshots from the drop-down list box. You can also click Create Bucket on the right to create an OBS bucket. For details, see Creating a Bucket.

    The created or existing OBS bucket must meet the following requirements:

    • Storage Class is Standard.
    • Region must be the same as that of the created cluster.

    Backup Path

    Storage path of the snapshot in the OBS bucket.

    The backup path cannot:
    • Contain the following characters: \:*?"<>|
    • Start with a slash (/).
    • Start or end with a period (.).
    • Exceed 1023 characters.

    IAM Agency

    To store snapshot data to an OBS bucket, you must have the required OBS access permissions. Select an IAM agency to grant the current account the permission to access and use OBS.
    • If you are configuring an agency for the first time, click Automatically Create IAM Agency to create css-obs-agency.
    • If there is an IAM agency automatically created earlier, you can click One-click authorization to have the OBS Administrator permissions deleted automatically, and have the following custom policies added automatically instead to implement more refined permissions control.
      "obs:bucket:GetBucketLocation",
      "obs:object:GetObjectVersion",
      "obs:object:GetObject",
      "obs:object:DeleteObject",
      "obs:bucket:HeadBucket",
      "obs:bucket:GetBucketStoragePolicy",
      "obs:object:DeleteObjectVersion",
      "obs:bucket:ListBucketVersions",
      "obs:bucket:ListBucket",
      "obs:object:PutObject"
    • When OBS buckets use SSE-KMS encryption, the IAM agency must be granted KMS permissions. You can click Automatically Create IAM Agency and One-click authorization to have the following custom policies created automatically.
      "kms:cmk:create",
      "kms:dek:create",
      "kms:cmk:get",
      "kms:dek:decrypt",
      "kms:cmk:list"
    • To use Automatically Create IAM Agency and One-click authorization, the following minimum permissions are required:
      "iam:agencies:listAgencies",
      "iam:roles:listRoles",
      "iam:agencies:getAgency",
      "iam:agencies:createAgency",
      "iam:permissions:listRolesForAgency",
      "iam:permissions:grantRoleToAgency",
      "iam:permissions:listRolesForAgencyOnProject",
      "iam:permissions:revokeRoleFromAgency",
      "iam:roles:createRole"
    • To use an IAM agency, the following minimum permissions are required:
      "iam:agencies:listAgencies",
      "iam:agencies:getAgency",
      "iam:permissions:listRolesForAgencyOnProject",
      "iam:permissions:listRolesForAgency"
  5. Enable the automatic snapshot creation function. The Configure Automatic Snapshot Creation dialog box is displayed. If the automatic snapshot creation function is enabled, you can click on the right of Automatic Snapshot Creation to modify the snapshot policy.
    Table 2 Setting automatic snapshot creation

    Parameter

    Description

    Snapshot Name Prefix

    The snapshot name prefix contains 1 to 32 characters and must start with a lowercase letter. Only lowercase letters, digits, hyphens (-), and underscores (_) are allowed. A snapshot name consists of a snapshot name prefix and a timestamp, for example, snapshot-1566921603720.

    Time Zone

    Time zone for the backup time, which cannot be changed. Specify Backup Started Time based on the time zone.

    Backup Start Time

    The time when the backup starts automatically every day. You can specify this parameter only in full hours, for example, 00:00 or 01:00. The value ranges from 00:00 to 23:00. Select a time from the drop-down list.

    Retained Snapshots

    Number of automatic snapshots to be retained. The value ranges from 1 to 90. The system automatically deletes excess snapshots every half hour. (The expiration deletion policy applies only to the snapshots that were automatically created at the same frequency as the current automatic snapshot creation policy.)
    NOTE:

    If the snapshot creation interval is short or if the data size of indexes is large, the number of automatic snapshots retained may not reach the value set using this parameter.

    Index

    Indexes that you want to back up using snapshots. The index names cannot contain spaces or uppercase letters, and cannot contain "\<|>/?. Use commas (,) to separate different index names. If you do not specify this parameter, all indexes in the cluster are backed up by default. You can use the asterisk (*) to match multiple indexes. For example, if you enter index*, then the data of all indexes whose names are prefixed with index will be backed up.

    NOTE:

    Run the GET /_cat/indices command in Kibana to query the names of all indexes in the cluster.

    Figure 1 Configure Automatic Snapshot Creation
  6. To apply an automatic snapshot policy, enter CONFIRM in the text box.Click OK to save the snapshot policy.
  7. Snapshots that are automatically created according to the snapshot policy are displayed in the snapshot list, along with manually created snapshots. You can distinguish between them based on Snapshot Type. In the upper right corner of the snapshot list, enter the keyword of the snapshot name or snapshot ID to search for the desired snapshots.
    NOTE:

    If snapshot creation fails, click on the right of the snapshot list to view the number of failed tasks and learn the failure causes. A maximum of 20 failed tasks can be displayed. When the snapshot function is disabled or the cluster is deleted, the failure records are also cleared.

  8. (Optional) Disable the automatic snapshot creation function.

    After you disable the automatic snapshot creation function, the system stops automatic creation of snapshots. If the system is creating a snapshot based on the automatic snapshot creation policy and the snapshot is not yet displayed in the snapshot list, you cannot disable the automatic snapshot creation function. In this case, if you click the button next to Automatic Snapshot Creation, a message is displayed, indicating that you cannot disable the function. You are advised to disable the function after the system completes automatic creation of the snapshot, and the created snapshot is displayed in the snapshot list.

    When disabling the automatic snapshot creation function, you can choose whether to delete the snapshots that have been automatically created by selecting Delete automated snapshots in the displayed dialog box. By default, automatically created snapshots are not deleted.

    • If you do not select Delete automated snapshots, automatically created snapshots are not deleted when you disable the automatic snapshot creation function. You can manually delete them later. For details, see Deleting an Elasticsearch Cluster Snapshot. If you do not manually delete the automatically created snapshots and enable the automatic snapshot creation function again, then all snapshots with Snapshot Type set to Automated in the snapshot list of the cluster can only be automatically deleted by the system. The system automatically deletes snapshots based on the policy configured when the automatic snapshot creation function is enabled. For example, if the number of retained snapshots is set to 10 in this policy and more than 10 snapshots are created, the system automatically deletes the excess snapshots on the half hour.
    • If you select Delete automated snapshots, all snapshots with Snapshot Type set to Automated in the snapshot list will be deleted when you disable the automatic snapshot creation function.
    NOTE:

    If snapshots are disabled, existing snapshots will not be automatically deleted. If you need to delete the snapshots, manage the bucket that stores snapshots on the OBS console.

Manually Creating a Snapshot

  1. Log in to the CSS management console.
  2. On the Clusters page, click the name of the target cluster. In the navigation pane on the left, choose Cluster Snapshots.

    Alternatively, on the Clusters page, locate the row that contains the target cluster and click More > Back Up and Restore in the Operation column to switch to the Cluster Snapshots page.

  3. On the displayed Cluster Snapshots page, click the icon to the right of Cluster Snapshot to enable the cluster snapshot function. If it is already enabled, skip this step.

    CSS will automatically create an OBS bucket and IAM agency for snapshot storage. The automatically created OBS bucket and IAM agency will be displayed on the page.

    To modify them, click on the right of Basic Configuration to edit the configuration. After the OBS bucket is changed, the cluster obtains snapshot data from the new bucket.

    Table 3 Basic configuration for a cluster snapshot policy

    Parameter

    Description

    OBS Bucket

    Select an OBS bucket for storing snapshots from the drop-down list box. You can also click Create Bucket on the right to create an OBS bucket. For details, see Creating a Bucket.

    The created or existing OBS bucket must meet the following requirements:

    • Storage Class is Standard.
    • Region must be the same as that of the created cluster.

    Backup Path

    Storage path of the snapshot in the OBS bucket.

    The backup path cannot:
    • Contain the following characters: \:*?"<>|
    • Start with a slash (/).
    • Start or end with a period (.).
    • Exceed 1023 characters.

    IAM Agency

    To store snapshot data to an OBS bucket, you must have the required OBS access permissions. Select an IAM agency to grant the current account the permission to access and use OBS.
    • If you are configuring an agency for the first time, click Automatically Create IAM Agency to create css-obs-agency.
    • If there is an IAM agency automatically created earlier, you can click One-click authorization to have the OBS Administrator permissions deleted automatically, and have the following custom policies added automatically instead to implement more refined permissions control.
      "obs:bucket:GetBucketLocation",
      "obs:object:GetObjectVersion",
      "obs:object:GetObject",
      "obs:object:DeleteObject",
      "obs:bucket:HeadBucket",
      "obs:bucket:GetBucketStoragePolicy",
      "obs:object:DeleteObjectVersion",
      "obs:bucket:ListBucketVersions",
      "obs:bucket:ListBucket",
      "obs:object:PutObject"
    • When OBS buckets use SSE-KMS encryption, the IAM agency must be granted KMS permissions. You can click Automatically Create IAM Agency and One-click authorization to have the following custom policies created automatically.
      "kms:cmk:create",
      "kms:dek:create",
      "kms:cmk:get",
      "kms:dek:decrypt",
      "kms:cmk:list"
    • To use Automatically Create IAM Agency and One-click authorization, the following minimum permissions are required:
      "iam:agencies:listAgencies",
      "iam:roles:listRoles",
      "iam:agencies:getAgency",
      "iam:agencies:createAgency",
      "iam:permissions:listRolesForAgency",
      "iam:permissions:grantRoleToAgency",
      "iam:permissions:listRolesForAgencyOnProject",
      "iam:permissions:revokeRoleFromAgency",
      "iam:roles:createRole"
    • To use an IAM agency, the following minimum permissions are required:
      "iam:agencies:listAgencies",
      "iam:agencies:getAgency",
      "iam:permissions:listRolesForAgencyOnProject",
      "iam:permissions:listRolesForAgency"
  4. After basic configurations are completed, click Create to manually create a snapshot.
    Table 4 Parameters for manually creating a snapshot

    Parameter

    Description

    Snapshot Name

    Name of a manually created snapshot. It can contain 4 to 64 characters and must start with a lowercase letter. Only lowercase letters, digits, hyphens (-), and underscores (_) are allowed. For snapshots you create manually, you can specify the snapshot name. The system will not automatically add a timestamp to the snapshot name.

    Index

    Indexes that you want to back up using snapshots. The index names cannot contain spaces or uppercase letters, and cannot contain "\<|>/?. Use commas (,) to separate different index names. If you do not specify this parameter, all indexes in the cluster are backed up by default. You can use the asterisk (*) to match multiple indexes. For example, if you enter index*, then the data of all indexes whose names are prefixed with index will be backed up.

    NOTE:

    Run the GET /_cat/indices command in Kibana to query the names of all indexes in the cluster.

    Description

    Description of the snapshot. The value contains 0 to 256 characters and cannot contain <>.

  5. Click OK to create the snapshot.

    After the snapshot is created, it is displayed in the snapshot list. The status Available indicates that the snapshot is created successfully. along with manually created snapshots. You can distinguish them by the Snapshot Type setting. In the upper right corner of the snapshot list, enter the keyword of the snapshot name or snapshot ID to search for the desired snapshots.

    NOTE:

    If snapshot creation fails, click on the right of the snapshot list to view the number of failed tasks and learn the failure causes. A maximum of 20 failed tasks can be displayed. When the snapshot function is disabled or the cluster is deleted, the failure records are also cleared.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback