Updated on 2024-04-19 GMT+08:00

Manually Creating a Snapshot

You can manually create a snapshot at any time to back up all data or data of specified indexes.

Prerequisites

To use the function of creating or restoring snapshots, the account or IAM user logging in to the CSS management console must have both of the following permissions:

  • OBS Administrator for project OBS in region Global service
  • Elasticsearch Administrator in the current region

Precautions

  • When creating a backup for the first time, you are advised to back up data of all indexes.
  • Cluster snapshots will increase the CPU usage and disk I/O. You are advised to take cluster snapshots during off-peak hours.
  • Before creating a snapshot, you need to perform basic configurations, including configuring the OBS bucket for storing snapshots, the snapshot backup path, and IAM agency used for security authentication.
  • If there are available snapshots in the snapshot list when you configure the OBS bucket for storing cluster snapshots for the first time, you cannot change the bucket for snapshots that are subsequently created automatically or manually. Exercise caution when you configure the OBS bucket.
  • If snapshots have been stored in the OBS bucket, the OBS bucket cannot be changed. You can disable the snapshot function, enable the snapshot function, and specify a new OBS bucket. After you disable the snapshot function, you cannot use previously created snapshots to restore the cluster.
  • If a cluster is in the Unavailable status, you can use the cluster snapshot function only to restore clusters and view existing snapshot information.
  • During backup and restoration of a cluster, you can perform only certain operations, including scaling out, accessing Kibana, viewing metric, and deleting other snapshots of clusters. However, you cannot perform the following operations: restarting or deleting the cluster, deleting a snapshot that is in the Creating or Restoring status, and creating or restoring another snapshot. If a snapshot is being created or restored for a cluster, any automatic snapshot creation task initiated for the 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.

Manually Creating a Snapshot

  1. In the CSS navigation pane on the left, click Clusters.
  2. On the Clusters page that is displayed, 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.
  4. Enable the cluster snapshot function. OBS buckets and IAM agencies are automatically created to store snapshots. The automatically created OBS bucket and IAM agency are displayed on the page. You can also click on the right of Basic Configuration to edit the configuration.
    Table 1 Cluster snapshot parameter

    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.

    Backup Path

    Storage path of the snapshot in the OBS bucket.

    The backup path configuration rules are as follows:
    • The backup path cannot contain the following characters: \:*?"<>|
    • The backup path cannot start with a slash (/).
    • The backup path cannot start or end with a period (.).
    • The backup path cannot contain more than 1,023 characters.

    IAM Agency

    IAM agency authorized by the current account to CSS access or maintain data stored in the OBS bucket. You can also click Create IAM Agency on the right to create an IAM agency. For details, see Creating an Agency.

    The created or existing IAM agency must meet the following requirements:

    • Agency Type must be Cloud service.
    • Set Cloud Service to Elasticsearch or CSS.
    • The agency must have the OBS Administrator permission for the OBS project in Global service.
  5. After basic configurations are completed, click Create.
    • Name indicates the name of the manually created snapshot, which 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 the time information to the snapshot name.
    • Index: Enter an index name. You can select an index for backup. Use commas (,) to separate multiple indexes. Uppercase letters, spaces, and the following special characters are not allowed: "\<|>/? If you do not specify this parameter, data of all indexes in the cluster is backed up by default. You can use the asterisk (*) to back up data of certain indices. For example, if you enter index*, then data of indices with the name prefix of index will be backed up.

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

    • Description: indicates the description of the created snapshot. The value contains 0 to 256 characters, and certain special characters (<>) are not allowed.
    Figure 1 Manually creating a snapshot
  6. Click OK.

    After the snapshot is created, it will be 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.