删除 Azure 备份恢复服务保管库Delete an Azure Backup Recovery Services vault

本文介绍如何删除 Azure 备份恢复服务保管库。This article describes how to delete an Azure Backup Recovery Services vault. 其中分别说明了如何删除依赖项,以及如何删除保管库。It contains instructions for removing dependencies and then deleting a vault.

开始之前Before you start

不能删除具有以下任何依赖项的恢复服务保管库:You can't delete a Recovery Services vault with any of the following dependencies:

  • 不能删除包含受保护数据源(例如,IaaS VM、SQL 数据库)的保管库。You can't delete a vault that contains protected data sources (for example, IaaS VMs, SQL databases).
  • 不能删除包含备份数据的保管库。You can't delete a vault that contains backup data. 删除备份数据后,它将进入已软删除状态。Once backup data is deleted, it will go into the soft deleted state.
  • 不能删除包含处于已软删除状态的备份数据的保管库。You can't delete a vault that contains backup data in the soft deleted state.
  • 不能删除包含已注册存储帐户的保管库。You can't delete a vault that has registered storage accounts.

如果在不删除依赖项的情况下尝试删除保管库,将会遇到以下错误消息之一:If you try to delete the vault without removing the dependencies, you'll encounter one of the following error messages:

  • 由于此保管库中存在现有资源,因此无法删除此保管库。Vault cannot be deleted as there are existing resources within the vault. 请确保不存在与此保管库关联的备份项、受保护的服务器或备份管理服务器。Please ensure there are no backup items, protected servers, or backup management servers associated with this vault. 注销与此保管库关联的以下容器,然后再继续删除。Unregister the following containers associated with this vault before proceeding for deletion.

  • 不能删除恢复服务保管库,因为该保管库中存在处于软删除状态的备份项。Recovery Services vault cannot be deleted as there are backup items in soft deleted state in the vault. 完成删除操作 14 天后,软删除的项将永久删除。The soft deleted items are permanently deleted after 14 days of delete operation. 请在永久删除了备份项且保管库中未留下任何处于软删除状态的项之后,尝试删除保管库。Please try vault deletion after the backup items are permanently deleted and there is no item in soft deleted state left in the vault. 有关详细信息,请参阅 Azure 备份的软删除For more information, see Soft delete for Azure Backup.

删除保管库的正确方式Proper way to delete a vault

警告

以下操作是破坏性的,无法撤消。The following operation is destructive and can't be undone. 与受保护服务器关联的所有备份数据和备份项将被永久删除。All backup data and backup items associated with the protected server will be permanently deleted. 请谨慎操作。Proceed with caution.

若要正确删除保管库,必须按以下顺序执行步骤:To properly delete a vault, you must follow the steps in this order:

  • 步骤 1:禁用软删除功能。Step 1: Disable the soft delete feature. 若要了解禁用软删除的步骤,请参阅此文See here for the steps to disable soft delete.

  • 步骤 2:禁用软删除后,请检查是否有任何项之前处于软删除状态。Step 2: After disabling soft delete, check if there are any items previously remaining in the soft deleted state. 如果存在处于软删除状态的项,则需要先取消删除它们,然后再次将其删除。If there are items in soft deleted state, then you need to undelete and delete them again. 按这些步骤操作,以便查找软删除项并将其永久删除。Follow these steps to find soft delete items and permanently delete them.

  • 步骤 3:你必须检查以下全部三个位置,以便验证是否有任何受保护的项:Step 3: You must check all of the following three places to verify if there are any protected items:

    • 云中受保护的项:转到保管库仪表板菜单 >“备份项”。Cloud protected items: Go to the vault dashboard menu > Backup Items. 必须通过“停止备份”或“删除备份数据”删除此处列出的所有项及其备份数据。All items listed here must be removed with Stop Backup or Delete Backup Data along with their backup data. 按这些步骤操作来删除这些项。Follow these steps to remove those items.
    • SQL Server 实例:转到保管库仪表板菜单 >“备份基础结构” > “受保护的服务器”。SQL Server instance: Go to the vault dashboard menu > Backup Infrastructure > Protected Servers. 在“受保护的服务器”中,选择要取消注册的服务器。In Protected Servers, select the server to unregister. 若要删除保管库,必须取消注册所有服务器。To delete the vault, you must unregister all the servers. 右键单击受保护的服务器并选择“取消注册”。Right-click the protected server and select Unregister.
    • 受 MARS 保护的服务器:转到保管库仪表板菜单 >“备份基础结构” > “受保护的服务器”。MARS protected servers: Go to the vault dashboard menu > Backup Infrastructure > Protected Servers. 如果你拥有受 MARS 保护的服务器,则必须删除此处列出的所有项及其备份数据。If you have MARS protected servers, then all items listed here must be deleted along with their backup data. 按这些步骤操作,以便删除受 MARS 保护的服务器。Follow these steps to delete MARS protected servers.
    • MABS 或 DPM 管理服务器:转到保管库仪表板菜单 >“备份基础结构” > “备份管理服务器”。MABS or DPM management servers: Go to the vault dashboard menu > Backup Infrastructure > Backup Management Servers. 如果你有 DPM 或 Azure 备份服务器 (MABS),则必须删除或注销此处列出的所有项及其备份数据。If you have DPM or Azure Backup Server (MABS), then all items listed here must be deleted or unregistered along with their backup data. 按这些步骤操作,以便删除管理服务器。Follow these steps to delete the management servers.
  • 步骤 4:必须确保删除所有已注册的存储帐户。Step 4: You must ensure all registered storage accounts are deleted. 转到保管库仪表板菜单 >“备份基础结构” > “存储帐户”。Go to the vault dashboard menu > Backup Infrastructure > Storage Accounts. 如果此处列出了你的存储帐户,则必须注销所有这些帐户。If you have storage accounts listed here, then you must unregister all of them.

完成这些步骤后,你可以继续删除保管库After you've completed these steps, you can continue to delete the vault.

如果你在本地或云上没有任何受保护的项,但仍收到保管库删除错误,请执行使用 Azure 资源管理器删除恢复服务保管库中的步骤If you don't have any protected items on-premises or cloud, but are still getting the vault deletion error, perform the steps in Delete the Recovery Services vault by using Azure Resource Manager

删除云中的受保护项Delete protected items in the cloud

首先,请阅读 开始之前 部分,以了解依赖项和保管库删除过程。First, read the Before you start section to understand the dependencies and vault deletion process.

若要停止保护并删除备份数据,请执行以下操作:To stop protection and delete the backup data, perform the following steps:

  1. 在门户中依次转到“恢复服务保管库”、“备份项”。 From the portal, go to Recovery Services vault, and then go to Backup items. 然后,选择云中的受保护项(例如,Azure 虚拟机、Azure 存储 [Azure 文件服务] 或 Azure 虚拟机上的 SQL Server)。Then, choose the protected items in the cloud (for example, Azure Virtual Machines, Azure Storage [the Azure Files service], or SQL Server on Azure Virtual Machines).

    选择备份类型。

  2. 右键单击并选择备份项。Right-click to select the backup item. 根据该备份项是否受保护,菜单将显示“停止备份”窗格或“删除备份数据”窗格。 Depending on whether the backup item is protected or not, the menu displays either the Stop Backup pane or the Delete Backup Data pane.

    • 如果显示了“停止备份”窗格,请从下拉菜单中选择“删除备份数据”。 If the Stop Backup pane appears, select Delete Backup Data from the drop-down menu. 输入备份项的名称(此字段区分大小写),然后从下拉菜单中选择原因。Enter the name of the backup item (this field is case-sensitive), and then select a reason from the drop-down menu. 输入备注(如果有)。Enter your comments, if you have any. 然后选择“停止备份”。Then, select Stop backup.

      “停止备份”窗格。

    • 如果显示了“删除备份数据”窗格,请输入备份项的名称(此字段区分大小写),然后从下拉菜单中选择原因。If the Delete Backup Data pane appears, enter the name of the backup item (this field is case-sensitive), and then select a reason from the drop-down menu. 输入备注(如果有)。Enter your comments, if you have any. 然后选择“删除”。Then, select Delete.

      “删除备份数据”窗格。

  3. 查看“通知”图标:“通知”图标。Check the Notification icon: The Notification icon. 完成该过程后,服务将显示以下消息:“正在停止 <备份项> 的备份并删除备份数据。 After the process finishes, the service displays the following message: Stopping backup and deleting backup data for " Backup Item ". 已成功完成该操作”。Successfully completed the operation.

  4. 在“备份项”菜单中选择“刷新”,确保已删除该备份项。 Select Refresh on the Backup Items menu, to make sure the backup item was deleted.

    “删除备份项”页。

删除本地的受保护项Delete protected items on premises

首先,请阅读 开始之前 部分,以了解依赖项和保管库删除过程。First, read the Before you start section to understand the dependencies and vault deletion process.

  1. 在保管库仪表板菜单中,选择“备份基础结构”。From the vault dashboard menu, select Backup Infrastructure.

  2. 根据本地方案选择以下选项之一:Depending on your on-premises scenario, choose the one of the following options:

    • 对于 MARS,请依次选择“受保护的服务器”、“Azure 备份代理”。 For MARS, select Protected Servers and then Azure Backup Agent. 然后选择要删除的服务器。Then, select the server that you want to delete.

      对于 MARS,请选择保管库打开其仪表板。

    • 对于 MABS 或 DPM,请选择“备份管理服务器”。For MABS or DPM, select Backup Management Servers. 然后选择要删除的服务器。Then, select the server that you want to delete.

      对于 MABS 或 DPM,请选择保管库以打开其仪表板。

  3. 此时会显示包含警告消息的“删除”窗格。The Delete pane appears with a warning message.

    “删除”窗格。

    查看警告消息,以及许可复选框中的说明。Review the warning message and the instructions in the consent check box.

    备注

    • 如果受保护的服务器已与 Azure 服务同步,并且备份项存在,则许可复选框将显示相关备份项的数量,以及用于查看备份项的链接。If the protected server is synced with Azure services and backup items exist, the consent check box will display the number of dependent backup items and the link to view the backup items.
    • 如果受保护的服务器未与 Azure 服务同步,并且备份项存在,则许可复选框只会显示备份项的数量。If the protected server isn't synced with Azure services and backup items exist, the consent check box will display only the number of backup items.
    • 如果没有任何备份项,则许可复选框将要求确认删除。If there are no backup items, the consent check box will ask for deletion.
  4. 选中许可复选框,然后选择“删除”。Select the consent check box, and then select Delete.

  5. 查看“通知”图标删除备份数据Check the Notification icon delete backup data. 操作完成后,服务将显示以下消息:正在停止“备份项”的备份并删除备份数据。After the operation finishes, the service displays the message: Stopping backup and deleting backup data for "Backup Item." 已成功完成该操作”。Successfully completed the operation.

  6. 在“备份项”菜单中选择“刷新”,确保已删除该备份项。 Select Refresh on the Backup Items menu, to make sure the backup item is deleted.

备注

如果你从门户中删除包含依赖项的本地受保护项,则会收到一条警告,指出“删除服务器的注册是破坏性操作,无法撤消。If you delete an on-premises protected item from a portal that contains dependencies, you'll receive a warning saying "Deleting server's registration is a destructive operation and cannot be undone. 与受保护服务器关联的所有备份数据(还原数据所需的恢复点)和备份项将被永久删除。”All backup data (recovery points required to restore the data) and Backup items associated with protected server will be permanently deleted."

此过程完成后,可以继续从管理控制台删除备份项:After this process finishes, you can delete the backup items from management console:

从 MARS 管理控制台删除备份项Delete backup items from the MARS management console

备注

如果在不停止备份的情况下删除或丢失了源计算机,则下一个计划的备份将失败。If you deleted or lost the source machine without stopping the backup, the next scheduled backup will fail. 旧恢复点将根据策略过期,但始终会保留最后一个恢复点,直至你停止备份并删除数据。The old recovery point expires according to the policy, but the last single recovery point is always retained until you stop the backup and delete the data. 为此,可以按照本部分的这些步骤操作。You can do this by following the steps in this section.

  1. 打开 MARS 管理控制台,转到“操作”窗格并选择“计划备份”。 Open the MARS management console, go to the Actions pane, and select Schedule Backup.

  2. 在“修改或停止计划的备份”页中选择“停止使用此备份计划并删除所有存储的备份”选项。 From the Modify or Stop a Scheduled Backup page, select Stop using this backup schedule and delete all the stored backups. 然后,选择“下一步”。Then, select Next.

    修改或停止计划的备份。

  3. 在“停止计划的备份”页中选择“完成”。 From the Stop a Scheduled Backup page, select Finish.

    停止计划的备份。

  4. 系统会提示输入安全 PIN(个人标识号)。必须手动生成该 PIN。You're prompted to enter a security PIN (personal identification number), which you must generate manually. 为此,请先登录到 Azure 门户。To do this, first sign in to the Azure portal.

  5. 转到“恢复服务保管库” > “设置” > “属性”。Go to Recovery Services vault > Settings > Properties.

  6. 在“安全 PIN”下选择“生成” 。Under Security PIN, select Generate. 复制此 PIN。Copy this PIN. 该 PIN 的有效时间仅为五分钟。The PIN is valid for only five minutes.

  7. 在管理控制台中粘贴该 PIN,然后选择“确定”。In the management console, paste the PIN, and then select OK.

    生成安全 PIN。

  8. “修改备份进度”页中会显示以下消息:“删除的备份数据会保留 14 天。该时间过后,备份数据会被永久删除。”In the Modify Backup Progress page, the following message appears: Deleted backup data will be retained for 14 days. After that time, backup data will be permanently deleted.

    删除备份基础结构。

删除本地备份项后,遵循门户中的后续步骤。After you delete the on-premises backup items, follow the next steps from the portal.

从 MABS 或 DPM 管理控制台删除备份项Delete backup items from the MABS or DPM management console

备注

如果在不停止备份的情况下删除或丢失了源计算机,则下一个计划的备份将失败。If you deleted or lost the source machine without stopping the backup, the next scheduled backup will fail. 旧恢复点将根据策略过期,但始终会保留最后一个恢复点,直至你停止备份并删除数据。The old recovery point expires according to the policy, but the last single recovery point is always retained until you stop the backup and delete the data. 为此,可以按照本部分的这些步骤操作。You can do this by following the steps in this section.

可以使用两种方法从 MABS 或 DPM 管理控制台删除备份项。There are two methods you can use to delete backup items from the MABS or DPM management console.

方法 1Method 1

若要停止保护并删除备份数据,请执行以下步骤:To stop protection and delete backup data, do the following steps:

  1. 打开 DPM 管理员控制台,在导航栏中选择“保护”。Open the DPM Administrator Console, and then select Protection on the navigation bar.

  2. 在显示窗格中,选择要删除的保护组成员。In the display pane, select the protection group member that you want to remove. 右键单击并选择“停止对组成员的保护”选项。Right-click to select the Stop Protection of Group Members option.

  3. 在“停止保护”对话框中选择“删除受保护的数据”,并选中“删除在线存储”复选框。 From the Stop Protection dialog box, select Delete protected data, and then select the Delete storage online check box. 然后选择“停止保护”。Then, select Stop Protection.

    在“停止保护”窗格中选择“删除受保护的数据”。

    受保护成员状态更改为“非活动副本可用”。The protected member status changes to Inactive replica available.

  4. 右键单击停用保护组,然后选择“删除停用保护”。Right-click the inactive protection group and select Remove inactive protection.

    删除非活动保护。

  5. 在“删除非活动保护”窗口中选中“删除在线存储”复选框,然后选择“确定”。 From the Delete Inactive Protection window, select the Delete online storage check box, and then select OK.

    删除在线存储。

方法 2Method 2

打开“MABS 管理”或“DPM 管理”控制台 。Open the MABS management or DPM management console. 在“选择数据保护方法”下,清除“我需要在线保护”复选框。 Under Select data protection method, clear the I want online protection check box.

选择数据保护方法。

删除本地备份项后,遵循门户中的后续步骤。After you delete the on-premises backup items, follow the next steps from the portal.

删除恢复服务保管库Delete the Recovery Services vault

  1. 删除所有依赖项后,在保管库菜单中滚动到“概要”窗格。When all dependencies have been removed, scroll to the Essentials pane in the vault menu.

  2. 确认是否未列出任何“备份项”、“备份管理服务器”或“复制的项”。Verify that there aren't any backup items, backup management servers, or replicated items listed. 如果项仍显示在保管库中,请参阅开始之前部分。If items still appear in the vault, refer to the Before you start section.

  3. 当保管库中没有其他任何项时,在保管库仪表板上选择“删除”。When there are no more items in the vault, select Delete on the vault dashboard.

    在保管库仪表板上选择“删除”。

  4. 选择“是”确认要删除该保管库。Select Yes to verify that you want to delete the vault. 随即会删除该保管库。The vault is deleted. 门户返回到“新建”服务菜单。The portal returns to the New service menu.

使用 PowerShell 删除恢复服务保管库Delete the Recovery Services vault by using PowerShell

首先,请阅读 开始之前 部分,以了解依赖项和保管库删除过程。First, read the Before you start section to understand the dependencies and vault deletion process.

若要停止保护并删除备份数据:To stop protection and delete the backup data:

  • 如果在 Azure VM 备份中使用 SQL 并为 SQL 实例启用了自动保护,请先禁用自动保护。If you're using SQL in Azure VMs backup and enabled auto-protection for SQL instances, first disable the auto-protection.

        Disable-AzRecoveryServicesBackupAutoProtection
           [-InputItem] <ProtectableItemBase>
           [-BackupManagementType] <BackupManagementType>
           [-WorkloadType] <WorkloadType>
           [-PassThru]
           [-VaultId <String>]
           [-DefaultProfile <IAzureContextContainer>]
           [-WhatIf]
           [-Confirm]
           [<CommonParameters>]
    

    详细了解如何对 Azure 备份保护的项禁用保护。Learn more on how to disable protection for an Azure Backup-protected item.

  • 停止保护并删除云中所有受备份保护的项(例如:IaaS VM 等)的数据:Stop protection and delete data for all backup-protected items in cloud (for example: IaaS VM and so on):

       Disable-AzRecoveryServicesBackupProtection
       [-Item] <ItemBase>
       [-RemoveRecoveryPoints]
       [-Force]
       [-VaultId <String>]
       [-DefaultProfile <IAzureContextContainer>]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]
    

    详细了解如何对备份保护的项禁用保护。Learn more about disables protection for a Backup-protected item.

  • 对于使用 Azure 备份代理 (MARS) 备份到 Azure 的受保护本地文件和文件夹,请使用以下 PowerShell 命令从每个 MARS PowerShell 模块中删除备份的数据:For on-premises Files and Folders protected using Azure Backup Agent (MARS) backing up to Azure, use the following PowerShell command to delete the backed-up data from each MARS PowerShell module:

    Get-OBPolicy | Remove-OBPolicy -DeleteBackup -SecurityPIN <Security Pin>
    

    之后,将出现以下提示:Afterwards, the following prompt will appear:

    Microsoft Azure 备份。确实要删除此备份策略吗?删除的备份数据会保留 14 天。之后,备份数据将永久删除。
    [Y] 是 [A] 全部为“是”[N] 否 [L] 全部为“否”[S] 暂停 [?] 帮助(默认选项为“Y”):
    Microsoft Azure Backup Are you sure you want to remove this backup policy? Deleted backup data will be retained for 14 days. After that time, backup data will be permanently deleted.
    [Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"):

  • 对于使用 MABS(Microsoft Azure 备份服务器)或 DPM (System Center Data Protection Manager) 在 Azure 中进行保护的本地计算机,请使用以下命令删除 Azure 中的备份数据。For on-premises machines protected using MABS (Microsoft Azure Backup Server) or DPM (System Center Data Protection Manager) to Azure, use the following command to delete the backed-up data in Azure.

    Get-OBPolicy | Remove-OBPolicy -DeleteBackup -SecurityPIN <Security Pin>
    

    之后,将出现以下提示:Afterwards, the following prompt will appear:

    Microsoft Azure 备份 确实要删除此备份策略吗?Microsoft Azure Backup Are you sure you want to remove this backup policy? 删除的备份数据会保留 14 天。Deleted backup data will be retained for 14 days. 该时间过后,备份数据会被永久删除。After that time, backup data will be permanently deleted.
    [Y] 是 [A] 全部是 [N] 否 [L] 全部否 [S] 暂停  [?] 帮助 (默认值为 "Y"):*[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"):*

删除备份的数据后,取消注册所有本地容器和管理服务器。After deleting the backed-up data, un-register any on-premises containers and management servers.

  • 对于使用 Azure 备份代理 (MARS) 备份到 Azure 的受保护本地文件和文件夹:For on-premises Files and Folders protected using Azure Backup Agent (MARS) backing up to Azure:

    Unregister-AzRecoveryServicesBackupContainer
              [-Container] <ContainerBase>
              [-PassThru]
              [-VaultId <String>]
              [-DefaultProfile <IAzureContextContainer>]
              [-WhatIf]
              [-Confirm]
              [<CommonParameters>]
    

    详细了解如何从保管库中取消注册 Windows 服务器或其他容器。Learn more about un-registering a Windows Server or other container from the vault.

  • 对于使用 MABS(Microsoft Azure 备份服务器)或 DPM (System Center Data Protection Manager) 在 Azure 中进行保护的本地计算机:For on-premises machines protected using MABS (Microsoft Azure Backup Server) or DPM to Azure (System Center Data Protection Manage:

        Unregister-AzRecoveryServicesBackupManagementServer
          [-AzureRmBackupManagementServer] <BackupEngineBase>
          [-PassThru]
          [-VaultId <String>]
          [-DefaultProfile <IAzureContextContainer>]
          [-WhatIf]
          [-Confirm]
          [<CommonParameters>]
    

    详细了解如何从保管库中取消注册备份管理容器。Learn more about un-registering a Backup management container from the vault.

永久删除备份的数据并取消注册所有容器后,继续删除保管库。After permanently deleting backed up data and un-registering all containers, proceed to delete the vault.

若要强制删除恢复服务保管库,请执行以下操作:To delete a Recovery Services vault:

    Remove-AzRecoveryServicesVault
   -Vault <ARSVault>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

详细了解如何删除恢复服务保管库。Learn more about deleting a Recovery Services vault.

使用 CLI 删除恢复服务保管库Delete the Recovery Services vault by using CLI

首先,请阅读 开始之前 部分,以了解依赖项和保管库删除过程。First, read the Before you start section to understand the dependencies and vault deletion process.

备注

目前,Azure 备份 CLI 仅支持管理 Azure VM 备份,因此,仅当保管库包含 Azure VM 备份时,以下命令才能删除保管库。Currently, Azure Backup CLI supports managing only Azure VM backups, so the following command to delete the vault works only if the vault contains Azure VM backups. 如果保管库包含非 Azure VM 类型的任何备份项,则无法使用 Azure 备份 CLI 删除该保管库。You can't delete a vault using Azure Backup CLI, if the vault contains any backup item of type other than Azure VMs.

若要删除现有的恢复服务保管库,请执行以下步骤:To delete existing Recovery Services vault, perform the following steps:

  • 停止保护并删除备份数据To stop protection and delete the backup data

    az backup protection disable --container-name
                             --item-name
                             [--delete-backup-data {false, true}]
                             [--ids]
                             [--resource-group]
                             [--subscription]
                             [--vault-name]
                             [--yes]
    

    有关详细信息,请参阅 此文For more information, see this article.

  • 删除现有的恢复服务保管库:Delete an existing Recovery Services vault:

    az backup vault delete [--force]
                       [--ids]
                       [--name]
                       [--resource-group]
                       [--subscription]
                       [--yes]
    

    有关详细信息,请参阅 此文For more information, see this article

使用 Azure 资源管理器删除恢复服务保管库Delete the Recovery Services vault by using Azure Resource Manager

仅当已删除所有依赖项后,仍然收到“保管库删除错误”时,才建议使用删除恢复服务保管库的选项。This option to delete the Recovery Services vault is recommended only if all of the dependencies are removed and you're still getting the Vault deletion error. 请尝试以下任意或所有提示:Try any or all of the following tips:

  • 在“概要”窗格中的保管库菜单内,确认是否未列出任何备份项、备份管理服务器或复制的项。From the Essentials pane in the vault menu, verify that there aren't any backup items, backup management servers, or replicated items listed. 如果存在备份项,请参阅开始之前部分。If there are backup items, refer to the Before you start section.
  • 重试从门户删除保管库Try deleting the vault from the portal again.
  • 如果删除了所有依赖项,但仍收到“保管库删除错误”,请使用 ARMClient 工具执行以下步骤(注释后面的步骤)。If all of the dependencies are removed and you're still getting the Vault deletion error, use the ARMClient tool to perform the following steps (after the note).
  1. 访问 chocolatey.org 下载并安装 Chocolatey。Go to chocolatey.org to download and install Chocolatey. 然后运行以下命令安装 ARMClient:Then, install ARMClient by running the following command:

    choco install armclient --source=https://chocolatey.org/api/v2/

  2. 登录到 Azure 帐户,然后运行以下命令:Sign in to your Azure account, and then run the following command:

    ARMClient.exe login [environment name]

  3. 在 Azure 门户中,收集所要删除的保管库的订阅 ID 和资源组名称。In the Azure portal, gather the subscription ID and resource group name for the vault you want to delete.

有关 ARMClient 命令的详细信息,请参阅 ARMClient READMEFor more information on the ARMClient command, see ARMClient README.

使用 Azure 资源管理器客户端删除恢复服务保管库Use the Azure Resource Manager client to delete a Recovery Services vault

  1. 使用订阅 ID、资源组名称和保管库名称运行以下命令。Run the following command by using your subscription ID, resource group name, and vault name. 如果没有任何依赖项,则运行以下命令时会删除保管库:If you don't have any dependencies, the vault is deleted when you run the following command:

    ARMClient.exe delete /subscriptions/<subscriptionID>/resourceGroups/<resourcegroupname>/providers/Microsoft.RecoveryServices/vaults/<Recovery Services vault name>?api-version=2015-03-15
    
  2. 如果保管库不为空,将出现以下错误消息:“由于此保管库中存在现有资源,因此无法删除此保管库。”If the vault isn't empty, you'll receive the following error message: Vault cannot be deleted as there are existing resources within this vault. 若要删除保管库中受保护的项或容器,请运行以下命令:To remove a protected item or container within a vault, run the following command:

    ARMClient.exe delete /subscriptions/<subscriptionID>/resourceGroups/<resourcegroupname>/providers/Microsoft.RecoveryServices/vaults/<Recovery Services vault name>/registeredIdentities/<container name>?api-version=2016-06-01
    
  3. 在 Azure 门户中,确保已删除该保管库。In the Azure portal, make sure that the vault is deleted.

后续步骤Next steps

了解恢复服务保管库 了解如何监视和管理恢复服务保管库Learn about Recovery Services vaults Learn about monitoring and managing Recovery Services vaults