バックアップを作成する (V2)
指定したクラスターまたはコレクションをバックアップします。この API は専用クラスターにのみ適用される点に注意してください。
POST/v2/clusters/{CLUSTER_ID}/backups/create
https://api.cloud.zilliz.com
shell
export BASE_URL="https://api.cloud.zilliz.com"
パラメータ
Authorizationstringheader必要
認証トークンは、適切な権限を持つ API key である必要があります。
値の例: Bearer {{TOKEN}}
CLUSTER_IDstringpath必要
バックアップ対象のクラスターの ID。
値の例: inxx-xxxxxxxxxxxxxxx
リクエスト・ボディapplication/json
backupTypestring必要
バックアップするリソースの種類。
dbCollectionsarray
バックアップ対象のコレクション。backupType が COLLECTION に設定されている場合は必須です。このフィールドに記載するすべてのコレクションは、同じデータベースに属している必要がある点に注意してください。
[]dbCollectionsobject
コレクション情報。
dbNamestring
collectionNames フィールドに記載されたコレクションを含むデータベースの名前。
collectionNamesarray
バックアップ対象のコレクション名。
[]collectionNamesstring
コレクション名
crossRegionCopiesarray
バックアップのコピー先となるクラウドリージョンのリスト。Zilliz Cloud はデフォルトでクラスターと同じリージョンにバックアップを作成するため、バックアップをコピーしたいリージョンのみ指定すればよい点に注意してください。リスト内の各エントリごとに、指定したリージョンに永続バックアップのコピーが 1 つ作成されます。
[]crossRegionCopiesobject
バックアップのコピー先となる対象クラウドリージョンの情報。
regionIdstring
バックアップのコピー先となる対象クラウドリージョンの ID。
値の例: aws-us-west-2
bash
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 "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"backupType": "CLUSTER"
}'
bash
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 "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"backupType": "COLLECTION",
"dbCollections": [
{
"dbName": "my_database",
"collectionNames": [
"collection_1",
"collection_2"
]
}
]
}'
レスポンス200 OK - application/json
レスポンス
codeinteger
レスポンスコード
dataobject
backupIdstring
作成されたバックアップの ID。
値の例: backupx_xxxxxxxxxxxxxxx
backupNamestring
作成されたバックアップの名前。
jobIdstring
このバックアップを作成した非同期ジョブの ID。
値の例: job-xxxxxxxxxxxxxxxxxxxx
エラーメッセージを返します。
codeinteger
レスポンスコード。
messagestring
エラーメッセージ。
Successjson
{
"code": 0,
"data": {
"backupId": "backupx_xxxxxxxxxxxxxxx",
"backupName": "Dedicated_01",
"jobId": "job-xxxxxxxxxxxxxxxxxxxxxx"
}
}