Restoring the Data of an Elasticsearch Cluster Using a Snapshot
Restore the data captured by a cluster snapshot to the current cluster or another eligible cluster.
Constraints
- 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.
- Cluster data cannot be queried during snapshot restoration.
- The destination and source clusters must have the same shards.
- The version of the destination cluster must be the same as or later than that of the source cluster.
Prerequisites
- The snapshot list contains snapshots whose Snapshot Status is Available. Storing snapshots in an OBS bucket may incur additional fees. For details, see OBS Billing Overview.
Restoring Data
- Log in to the CSS management console.
- 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.
- In the Snapshots area, locate the row that contains the snapshot you want to restore and click Restore in the Operation column.
Figure 1 Selecting a snapshot
- On the Restore page, set restoration parameters.
Table 1 Restoration settings Parameter
Description
Index
Enter the name of the index you want to restore. If you do not specify any index name, the data of all indexes will be restored. This parameter is left blank by default. The value can contain 0 to 1024 characters, and cannot contain spaces, uppercase letters, or the following special characters: "\<|>/?. You can use the asterisk (*) to match multiple indexes. For example, index* indicates that all indexes with the prefix index will be restored.
Rename Pattern
Enter a regular expression. Indexes that match the regular expression will be restored. The default value index_(.+) indicates all indexes. The value can contain 0 to 1024 characters, and cannot contain spaces, uppercase letters, or the following special characters: "\<|>/?,.
NOTE:The Rename Pattern and Rename Replacement take effect only when they are both configured at the same time.
Rename Replacement
Rule for index renaming. The default value restored_index_$1 indicates that restored_ will be added to the beginning of the names of all restored indexes. The value can contain 0 to 1024 characters, and cannot contain spaces, uppercase letters, or the following special characters: "\<|>/?,.
NOTE:The Rename Pattern and Rename Replacement take effect only when they are both configured at the same time.
Cluster
Select the cluster where you want to restore the data to. You can select the current cluster or another.
- You must specify a cluster whose status is Available. If the status of the current cluster is Unavailable, you cannot restore the snapshot to the current cluster.
- When restoring data to another cluster, make sure the version of the destination cluster is not earlier than the current cluster. After a frozen index is restored using a snapshot, the index is stored on the local node and is read-only by default. To make it writable, run the following command to configure the index:
PUT index_name/_settings { "index.blocks.write": null }
- Select or deselect Overwrite same-name indexes in the destination cluster. Data restoration using snapshots works by overwriting existing snapshot files. When there are same-name indexes in the destination cluster, you need to select this option in order to restore same-name, same-shard structure indexes. Indexes with a different shard structure cannot be restored. Exercise caution when performing this operation.
- Click OK. If restoration succeeds, Task Status of the snapshot in the snapshot list will change to Restoration succeeded, and the data of indexes is generated according to the snapshot information.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot