为一个 M2 或 M5 集群创建一个恢复作业
已弃用
恢复指定的 M2 或 M5 集群。MongoDB Cloud 限制哪些集群可以作为恢复的目标集群。目标集群无法使用静态加密、运行与快照不同的主要版本 MongoDB 版本或在恢复期间接收客户端请求。MongoDB Cloud 会在恢复操作之前删除目标集群上的所有现有数据。要使用此资源,请求的服务账户或 API 密钥必须具有“项目所有者”角色。
在 之前,此端点还可用于使用 createCluster 端点创建的 Flex 集群或已迁移到2 5Flex 集群的前 M /M2026 集群,在此之后此端点将被停用。请改用 createFlexBackupRestoreJob 端点。
POST /API/Atlas/v1.0/groups/{groupId}/clusters/{clusterName}/ 备份/tenant/ 恢复
curl \
--request POST 'https://cloud.mongodb.com/api/atlas/v1.0/groups/32b6e34b3d91647abb20e7b8/clusters/{clusterName}/backup/tenant/restore' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"snapshotId":"32b6e34b3d91647abb20e7b8","targetDeploymentItemName":"string","targetProjectId":"32b6e34b3d91647abb20e7b8"}'
请求示例
{
"snapshotId": "32b6e34b3d91647abb20e7b8",
"targetDeploymentItemName": "string",
"targetProjectId": "32b6e34b3d91647abb20e7b8"
}
响应示例 (200)
{
"clusterName": "string",
"deliveryType": "RESTORE",
"expirationDate": "2025-05-04T09:42:00Z",
"id": "32b6e34b3d91647abb20e7b8",
"links": [
{
"href": "https://cloud.mongodb.com/api/atlas",
"rel": "self"
}
],
"projectId": "32b6e34b3d91647abb20e7b8",
"restoreFinishedDate": "2025-05-04T09:42:00Z",
"restoreScheduledDate": "2025-05-04T09:42:00Z",
"snapshotFinishedDate": "2025-05-04T09:42:00Z",
"snapshotId": "32b6e34b3d91647abb20e7b8",
"snapshotUrl": "string",
"status": "PENDING",
"targetDeploymentItemName": "string",
"targetProjectId": "32b6e34b3d91647abb20e7b8"
}
响应示例 (400)
{
"error": 400,
"detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
"reason": "Bad Request",
"errorCode": "VALIDATION_ERROR"
}
响应示例 (401)
{
"error": 401,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Unauthorized",
"errorCode": "NOT_ORG_GROUP_CREATOR"
}
响应示例 (403)
{
"error": 403,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Forbidden",
"errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
响应示例 (404)
{
"error": 404,
"detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
"reason": "Not Found",
"errorCode": "RESOURCE_NOT_FOUND"
}
响应示例 (409)
{
"error": 409,
"detail": "(This is just an example, the exception may not be related to this endpoint) Cannot delete organization link while there is active migration in following project ids: 60c4fd418ebe251047c50554",
"reason": "Conflict",
"errorCode": "CANNOT_DELETE_ORG_ACTIVE_LIVE_MIGRATION_ATLAS_ORG_LINK"
}
响应示例 (500)
{
"error": 500,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Internal Server Error",
"errorCode": "UNEXPECTED_ERROR"
}