跳到主要内容

恢复集群备份

本接口可将指定备份记录恢复到同一云区域内相同 CU 类型的新集群中。仅适用于 Dedicated 集群。
POST
/v2/clusters/{CLUSTER_ID}/backups/{BACKUP_ID}/restoreCluster
Base URL

该 API 的 Base URL 格式如下:

https://api.cloud.zilliz.com.cn

📘说明

控制面接口速率限制为单用户单接口每秒最多 20 个请求。

export BASE_URL="https://api.cloud.zilliz.com.cn"
参数
Authorizationstringheaderrequired

认证令牌,应为具备适当权限的 API 密钥。

示例值:Bearer {{TOKEN}}
CLUSTER_IDstringpathrequired

The ID of the cluster that needs to be backed up.

示例值:inxx-xxxxxxxxxxxxxxx
BACKUP_IDstringpathrequired

The ID of the backup in concern.

示例值:backup-xxxxxxxxxxxxxxx
请求体application/json
projectIdstring必填项

The ID of the project to which the restored cluster belongs.

clusterNamestring必填项

The name of the restored cluster.

cuSizeinteger必填项

The CU size allocated to the restored cluster.

取值范围:≥ 1≤ 256
collectionStatusstring必填项

The status of the collections in the restored cluster.

export TOKEN="YOUR_API_KEY"
export CLUSTER_ID="inxx-xxxxxxxxxxxxxxx"
export BACKUP_ID="backup-xxxxxxxxxxxxxxx"

curl --request POST \
--url "${BASE_URL}/v2/clusters/${CLUSTER_ID}/backups/${BACKUP_ID}/restoreCluster" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Content-Type: application/json" \
-d '{
"projectId": "proj-xxxxxxxxxxxxxxxxxxxx",
"clusterName": "Dedicated-12",
"cuSize": 2,
"collectionStatus": "KEEP"
}'
响应200 - application/json
codeinteger

Response code.

dataobject

Response payload which is the information of the restored cluster.

clusterIdstring

The ID of the restored cluster.

usernamestring

The username used to access the restored cluster.

passwordstring

The password used to access the restored cluster. This is shown only once. You are advised to note down the password and save it in a secure place.

jobIdstring

The ID of the cluster restoration job created upon this request.

Returns an error message.

codeinteger

响应码。

messagestring

错误描述。

{
"code": 0,
"data": {
"clusterId": "inxx-xxxxxxxxxxxxxxx",
"username": "db_admin",
"password": "xxxxxxxxx",
"jobId": "job-xxxxxxxxxxxxxx"
}
}