如何删除Azure恢复服务保管库? [英] How to delete Azure Recovery Services vault?

查看:88
本文介绍了如何删除Azure恢复服务保管库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试从Azure门户删除Azure Recovery Services Vault时,出现如下图所示的错误.甚至我也从保管库中删除了所有备份项目和复制项目.

When I am trying to delete the Azure Recovery Services Vault from Azure portal, I got the error like in below figure. Even I deleted all backup items and replicated items from the vault.

要删除Azure Recovery Services保管库,请点击以下链接

For deleting the Azure Recovery Services vault, I have followed the below link

删除Azure备份保管库

那么,如何使用门户或Power Shell cmdlet删除Azure恢复服务保管库?

So, how to delete the Azure recovery Services vault using portal or power shell cmdlet?

推荐答案

我曾经遇到过相同的问题,库中有SQL备份.您需要找到SQL备份并将其删除.

I used to encounter the same problem, there are SQL backups in the vault. You need find SQL backups and delete them.

您可以查看答案来解决此问题.

You could check this answer to solve this issue.

$vault = Get-AzureRmRecoveryServicesVault -Name "VaultName"

Set-AzureRmRecoveryServicesVaultContext -Vault $vault

#VIEW THE BACKUP ITEMS
$container = Get-AzureRmRecoveryServicesBackupContainer -ContainerType AzureSQL -FriendlyName $vault.Name

$item = Get-AzureRmRecoveryServicesBackupItem -Container $container -WorkloadType AzureSQLDatabase

$availableBackups = Get-AzureRmRecoveryServicesBackupRecoveryPoint -Item $item

$availableBackups      
#REMOVE THE BACKUP ITEMS AND VAULT
$containers = Get-AzureRmRecoveryServicesBackupContainer -ContainerType AzureSQL -FriendlyName $vault.Name

ForEach ($container in $containers)
{
    $items = Get-AzureRmRecoveryServicesBackupItem -container $container -WorkloadType AzureSQLDatabase

    ForEach ($item in $items)
    {
        Disable-AzureRmRecoveryServicesBackupProtection -item $item -RemoveRecoveryPoints -ea SilentlyContinue
    }

    Unregister-AzureRmRecoveryServicesBackupContainer -Container $container
}

Remove-AzureRmRecoveryServicesVault -Vault $vault

这篇关于如何删除Azure恢复服务保管库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆