恢复 Collection 备份
Restore collection backup to an existing cluster. Note that this API only applies to dedicated clusters.
该 API 的 Base URL 格式如下:
https://api.cloud.zilliz.com.cn
export BASE_URL="https://api.cloud.zilliz.com.cn"
认证令牌,应为具备适当权限的 API 密钥。
The ID of the cluster whose collection backup is in concern.
The ID of the backup in concern.
The ID of the cluster to which the restored collection belongs.
A list of collection groups.
A collection group.
The name of the source database containing the collections listed in the collectionNames
field.
The name of the destination database to which the specified collections will be restored.
Currently, Zilliz Cloud restores only one collection at a time. Therefore, include only one collection name in the list. If this is left unspecified, all collections in the backup will be restored to the target cluster unloaded.
A collection to restore.
The name of the source collection to restore.
The name of the target collection.
The status of the target collection.
export TOKEN="YOUR_API_KEY"
export CLUSTER_ID="inxx-xxxxxxxxxxxxxxx"
export BACKUP_ID="Dedicated-01_backup3"
curl --request POST \
--url "${BASE_URL}/v2/clusters/${CLUSTER_ID}/backups/${BACKUP_ID}/restoreCollection" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Content-Type: application/json" \
-d '{
"destClusterId": "in01-xxxxxxxxxxxxxx",
"dbCollections": [
{
"collections": [
{
"collectionName": "medium_articles",
"targetCollectionName": "restore_medium_articles",
"targetCollectionStatus": "LOADED"
}
]
}
]
}'
Response code.
Response payload which is the ID of an asynchronous control-plane job.
The ID of a collection restoration job created upon this request.
Returns an error message.
响应码。
错误描述。
{
"code": 0,
"data": {
"jobId": "job-xxxxxxxxxxxxxxxxxxxxxx"
}
}