Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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 that:
- Contains protected data sources. Examples include infrastructure as a service (IaaS) virtual machines (VMs), SQL databases, or Azure file shares.
- Contains backup data. After backup data is deleted, it goes into the soft-deleted state.
- Contains backup data in the soft-deleted state.
- Has registered storage accounts.
If you try to delete the vault without removing the dependencies, you 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. 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."
For more information, see Soft delete for Azure Backup.
Before you delete an Azure Backup protection policy from a vault, you must ensure that:
- The policy doesn't have any associated Azure Backup items.
- Each associated item is associated with some other policy.
Delete a Recovery Services vault
Choose a client:
Warning
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.
If you're sure that all backed-up items in the vault are no longer required and you want to delete them all at once without reviewing, run this PowerShell script. The script deletes all backup items recursively and eventually deletes the entire vault.
To delete a vault, follow these steps:
Step 1: Go to the vault Overview, select Delete, and then follow the instructions to remove Azure Backup and Azure Site Recovery items for vault deletion. Each link calls the respective pane to perform the corresponding vault-deletion steps.
To understand the process, see the instructions in the following steps. You can also go to each pane to delete vaults.
Alternatively, go to the panes manually by following these steps:
Step 2: If multiuser authorization (MUA) is enabled, seek necessary permissions from the security administrator before vault deletion. Learn more.
Step 3: Disable the soft delete and security features.
- Go to Properties > Security Settings and disable Soft Delete, if enabled. For more information, see how to disable soft delete.
- Go to Properties > Security Settings and disable Security Features, if enabled. Learn more.
Step 4: Delete cloud-protected items.
After you disable soft delete, check if any items remain in the soft-deleted state. If there are items in the soft-deleted state, restore them and then delete them again. To find soft-deleted items and permanently delete them, follow these steps.
Go to the vault dashboard menu and select Backup Items. Select Stop Backup to stop the backups of all listed items, and then select Delete Backup Data. To remove those items, follow these steps.
Note
You don't need to delete the VM or policy. You only need to stop backup to the vault.
Step 5: Delete backup servers.
Before you delete the vault, ensure that all on-premises backup servers are unregistered from the vault. To unregister the servers, follow these steps based on your on-premises scenario:
Go to the vault dashboard menu and select Backup Infrastructure > Protected Servers. On Protected Servers, select the backup management type from the list. To delete the vault, you must unregister all the servers. On the selected backup management pane, select the More icon (...) that corresponds to each protected server and select Unregister.
Microsoft Azure Recovery Services (MARS) protected servers: Go to the vault dashboard menu and select Backup Infrastructure > Protected Servers. If you used MARS to protect the servers, all servers listed here must be deleted along with their backup data. To delete MARS-protected servers, follow these steps.
Microsoft Azure Backup Server (MABS) or Data Protection Manager (DPM) management servers: Go to the vault dashboard menu and select Backup Infrastructure > Backup Management Servers. If you have DPM or MABS, all items listed here must be deleted or unregistered along with their backup data. To delete the management servers, follow these steps.
Deleting MARS, MABS, or DPM servers also removes the corresponding backup items protected in the vault.
Step 6: Unregister storage accounts.
Ensure that all registered storage accounts are unregistered for successful vault deletion. Go to the vault dashboard menu and select Backup Infrastructure > Storage Accounts. If you have storage accounts listed here, you must unregister all of them. Learn more about how to unregister a storage account.
Step 7: Remove private endpoints.
Ensure that no private endpoints were created for the vault. Go to the vault dashboard menu, select Settings > Networking, and then select Private access. Check if the vault has any private endpoint connections that were created or attempted to be created. Ensure that they're removed before you proceed with the vault delete.
Step 8: Delete the vault.
After you finish these steps, continue to delete the vault.
If you're still unable to delete the vaults that contain no dependencies, follow the steps in Delete a vault by using the Azure Resource Manager client.
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, follow these steps:
In the portal, go to Recovery Services vault, and then go to Backup items. Then, in the Backup Management Type list, select the protected items in the cloud (for example, Azure Virtual Machines, Azure Storage, Azure Files, or SQL Server on Azure Virtual Machines).
In the list of all the items for the category, 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 dropdown menu. Enter the name of the backup item (this field is case sensitive), and then select a reason from the dropdown menu. Enter your comments, if you have any, and 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 dropdown menu. Enter your comments, if you have any, and then select Delete.
This option deletes scheduled backups and also deletes on-demand backups.
Check 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.On the Backup Items menu, select Refresh to make sure that 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.
On the vault dashboard menu, select Backup Infrastructure.
Depending on your on-premises scenario, choose one of the following options:
For MARS, select Protected Servers, and then select Azure Backup Agent. Then, select the server that you want to delete.

For MABS or DPM, select Backup Management Servers. Then, select the server that you want to delete.

The Delete pane appears with a warning message.

Review the warning message and the instructions in the consent checkbox.
Note
- If the protected server is synced with Azure services and backup items exist, the consent checkbox shows the number of dependent backup items and the link to view the backup items.
- If the protected server isn't synced with Azure services and backup items exist, the consent checkbox shows only the number of backup items.
- If there are no backup items, the consent checkbox asks for deletion.
Select the consent checkbox, and then select Delete.
Check the Notification icon:
. After the operation finishes, the service displays the following message: Stopping backup and deleting backup data for Backup Item. Successfully completed the operation.On the Backup Items menu, select Refresh to make sure that the backup item is deleted.
If you delete an on-premises protected item from a portal that contains dependencies, you receive the following warning: "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 the management console:
- Delete backup items from the MARS management console
- Delete backup items from the MABS or DPM management console
Delete backup items from the MARS management console
If you deleted or lost the source machine without stopping the backup, the next scheduled backup fails. 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. Follow the steps in this section.
Open the MARS management console, go to the Actions pane, and select Schedule Backup.
On the Modify or Stop a Scheduled Backup pane, select Stop using this backup schedule and delete all of the stored backups. Then, select Next.

On the Stop a Scheduled Backup page, select Finish.
You're prompted to enter a security personal identification number (PIN), which you must generate manually:- Sign in to the Azure portal.
- Go to Recovery Services vault > Settings > Properties.
- Under Security PIN, select Generate. Copy this PIN. The PIN is valid for only five minutes.
In the management console, paste the PIN, and then select OK.

On 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.
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 fails. 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. Follow the steps in this section.
There are two methods you can use to delete backup items from the MABS or DPM management console.
Method 1
To stop protection and delete backup data, follow these steps:
Open the DPM administrator console, and on the left pane, select Protection.
On the display pane, select the protection group member that you want to remove. Right-click the Stop Protection of Group Members option.
In the Stop Protection dialog, select Delete protected data, and then select the Delete storage online checkbox. Then, select Stop Protection.

For the following versions, you're prompted to enter a security PIN, which you must generate manually:
- DPM 2019 UR1 and later
- DPM 2016 UR9 and later
- MABS V3 UR1 and later
To generate the PIN, follow these steps:
- Sign in to the Azure portal.
- Go to Recovery Services vault > Settings > Properties.
- Under Security PIN, select Generate.
- Copy the PIN. The PIN is valid for only five minutes.
In the management console, paste the PIN, and then select Submit.

If you previously selected Delete storage online in the Stop Protection dialog, ignore this step. Right-click the inactive protection group and select Remove inactive protection.

In the Delete Inactive Protection dialog, select the Delete online storage checkbox, and then select OK.

For the following versions, you're prompted to enter a security PIN, which you must generate manually:
- DPM 2019 UR1 and later
- DPM 2016 UR9 and later
- MABS V3 UR1 and later
To generate the PIN, follow these steps:
- Sign in to the Azure portal.
- Go to Recovery Services vault > Settings > Properties.
- Under Security PIN, select Generate.
- Copy the PIN. The PIN is valid for only five minutes.
In the management console, paste the PIN, and then select Submit.

The protected member status changes to Inactive replica available.
Method 2
Open the MABS management or DPM management console. Under Select data protection method, clear the I want online protection checkbox.

After you delete the on-premises backup items, follow the next steps from the portal.
Delete the Recovery Services vault
After you remove all dependencies, scroll to the Essentials pane in the vault menu.
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.
When there are no more items in the vault, select Delete on the vault dashboard.

Select Yes to verify that you want to delete the vault. The vault is deleted. The portal returns to the New service menu.