跳到主要内容

恢复 Collection 备份

Restore collection backup to an existing cluster. Note that this API only applies to dedicated clusters.

POST
/v2/clusters/{CLUSTER_ID}/backups/{BACKUP_ID}/restoreCollection
Base URL

该 API 的 Base URL 格式如下:

https://api.cloud.zilliz.com

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

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

示例值:Bearer {{TOKEN}}
CLUSTER_IDstringpathrequired

The ID of the cluster whose collection backup is in concern.

示例值:inxx-xxxxxxxxxxxxxxx
BACKUP_IDstringpathrequired

The ID of the backup in concern.

示例值:Dedicated-01_backup3
请求体application/json
destClusterIdstring必填项

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

dbCollectionsarray

A list of collection groups.

[]dbCollectionsobject

A collection group.

collectionsarray

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.

[]collectionsobject

A collection to restore.

collectionNamestring

The name of the source collection to restore.

targetCollectionNamestring

The name of the target collection.

targetCollectionStatusstring

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"
}
]
}
]
}'
响应200 - application/json
codeinteger

Response code.

dataobject

Response payload which is the ID of an asynchronous control-plane job.

jobIdstring

The ID of a collection restoration job created upon this request.

Returns an error message.

codeinteger

响应码。

messagestring

错误描述。

{
"code": 0,
"data": {
"jobId": "job-xxxxxxxxxxxxxxxxxxxxxx"
}
}