创建备份
Back up the specified cluster or collection. Note that this API only applies to dedicated clusters.
POST
/v2/clusters/{CLUSTER_ID}/backups/create该 API 的 Base URL 格式如下:
https://api.cloud.zilliz.com.cn
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
请求体application/json
backupTypestring必填项
The type of the resources to be backed up.
dbCollectionsarray
The collections that need to be backed up.
[]dbCollectionsobject
The collection information.
collectionNamesarray
The names of the collections to be backed up.
[]collectionNamesstring
A collection name
export TOKEN="YOUR_API_KEY"
export CLUSTER_ID="inxx-xxxxxxxxxxxxxxx"
curl --request POST \
--url "${BASE_URL}/v2/clusters/${CLUSTER_ID}/backups/create" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Content-Type: application/json" \
-d '{
"backupType": "COLLECTION",
"dbCollections": [
{
"collectionNames": [
"medium_articles"
]
}
]
}'
响应200 - application/json
codeinteger
Response code
dataobject
backupIdstring
The ID of the backup that has been created.
示例值:backupx_xxxxxxxxxxxxxxx
backupNamestring
The name of the backup that has been created.
jobIdstring
The ID of the asynchronous job that has created this backup.
示例值:job-xxxxxxxxxxxxxxxxxxxx
Returns an error message.
codeinteger
响应码。
messagestring
错误描述。
{
"code": 0,
"data": {
"backupId": "backupx_xxxxxxxxxxxxxxx",
"backupName": "Dedicated_01",
"jobId": "job-xxxxxxxxxxxxxxxxxxxxxx"
}
}