迁移数据至现有集群
Migrate data from a cluster to another.
该 API 的 Base URL 格式如下:
https://api.cloud.zilliz.com.cn
export BASE_URL="https://api.cloud.zilliz.com.cn"
认证令牌,应为具备适当权限的 API 密钥。
The source cluster information.
The ID of the source cluster.
The destination cluster information.
The ID of the destination cluster.
The collections that need to be migrated.
Collection information.
The name of the source database. This is optional. If left unspecified, the default database applies.
The name of the destination database.
The names of the collections that need to be migrated in the above specified source database. If this is left unspecified, all collections in the source database will be migrated.
A list of collection names.
A collection name.
export TOKEN="YOUR_API_KEY"
curl --request POST \
--url "${BASE_URL}/v2/migrations/toExisting" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Content-Type: application/json" \
-d '{
"source": {
"clusterId": "inxx-xxxxxxxxxxxxxxx"
},
"destination": {
"clusterId": "inxx-xxxxxxxxxxxxxxx"
},
"dbCollections": [
{
"collections": [
{
"collectionName": "medium_articles"
}
]
}
]
}'
响应码。
The ID of the job that has been created upon your request.
Returns an error message.
响应码。
错误描述。
{
"code": 0,
"data": {
"jobId": "job-xxxxxxxxxxxxxxxxxxxxxx"
}
}