Restoring a Snapshot
Function
This API is used to manually restore a snapshot.
URI
POST /v1.0/{project_id}/clusters/{cluster_id}/index_snapshot/{snapshot_id}/restore
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID and name, see Obtaining a Project ID and Name. |
cluster_id |
Yes |
String |
ID of the cluster whose snapshot you want to restore. |
snapshot_id |
Yes |
String |
Snapshot ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
targetCluster |
Yes |
String |
ID of the cluster that a snapshot is to be restored to. |
indices |
No |
String |
Name of an index to be restored. Multiple indexes are separated by commas (,). By default, all indexes are restored. You can use \ * to match multiple indexes. For example, if you specify 2018-06*, then the data of the indexes with the prefix 2018-06 will be restored.The value can contain 0 to 1,024 characters. Uppercase letters, spaces, and the following special characters are not allowed: "\<|>/? |
renamePattern |
No |
String |
Rule for defining the indexes to be restored. The value contains a maximum of 1,024 characters. Indexes that match this rule will be restored. The filtering condition must be a regular expression. The value can contain 0 to 1,024 characters. Uppercase letters, spaces, and the following special characters are not allowed: "\<|>/? |
renameReplacement |
No |
String |
Rule for renaming an index. The value can contain 0 to 1,024 characters. Uppercase letters, spaces, and the following special characters are not allowed: "\<|>/? For example, restored_index_$1 indicates adding the restored_ prefix to the names of all the restored indexes.The renameReplacement parameter takes effect only if renamePattern has been enabled. |
Response Parameters
None
Example Requests
{ "targetCluster" : "ea244205-d641-45d9-9dcb-ab2236bcd07e", "indices" : "myindex1,myindex2", "renamePattern" : "index", "renameReplacement" : "restored_index_$1" }
Example Responses
None
Status Codes
Status Code |
Description |
---|---|
201 |
Resource created. |
400 |
Invalid request. Modify the request before retry. |
403 |
Request rejected.The server has received the request and understood it, but the server refuses to respond to it. The client should not repeat the request without modifications. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.