对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。

将云备份快照导出到 Azure Blob 存储

注意

此功能适用于 M10 集群或更高版本。要了解有关 Free 集群可用功能的更多信息,请参阅 Atlas Free Cluster Limits;有关 Flex 集群的更多信息,请参阅 Atlas Flex Limitations。

Atlas 允许您将云备份快照导出到 Azure Blob 存储容器。您可以通过两种方式导出快照:

每个程序都需要相同的 前提条件。

有关 Atlas 如何导出快照及其上传的文件的概览,请参阅 将云备份快照导出到对象存储。

您无法执行以下操作:

接口

要导出云备份快照,您需要一个启用了 云备份的 M10 或更高版本 Atlas 集群。此外,要设置 Atlas 对对象存储的访问,您必须执行以下操作:

1

为您的 Atlas 项目设置 Azure 服务主体及访问策略。

2

将 Storage Blob Delegator 和 Storage Blob Data Contributor 角色分配给 Azure 服务主体。

要将角色分配给服务主体,您需要以下信息:

角色
说明

Storage Blob Delegator

这允许服务主体签署 SAS 令牌,以访问 Azure 存储容器。要分配此角色,请运行以下命令:

az role assignment create --assignee-object-id <service-principal-id> --role "Storage Blob Delegator" --scope /subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.Storage/storageAccounts/<storage-account-name>

Storage Blob Data Contributor

这允许对 Azure 存储容器进行读取、写入和删除 blob 访问权限。要分配此角色,请运行以下命令:

az role assignment create --assignee-principal-type ServicePrincipal --assignee-object-id <service-principal-id> --role "Storage Blob Data Contributor" --scope /subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.Storage/storageAccounts/<storage-account-name>/blobServices/default/containers/<container-name>

要创建自动导出的导出策略,运行以下过程:

要为单个快照创建导出作业,请运行以下程序: