If you’re working with an Azure VM and want to delete the backup restore point collection, you might find that the resource group associated with it refuses to be deleted. Here’s a simple guide to help you understand the issue and how to resolve it.
When you enable backups on an Azure VM, Azure automatically creates a hidden resource group called something like “AzureBackupRG_region_number” (for example, “AzureBackupRG_eastus_1”). This group holds the restore point collection, which is used for instant restore snapshots. These restore points are different from the recovery points stored in the Recovery Services vault. When you delete the VM, disable the backup, and delete the vault, the restore point collection can sometimes be left behind as an orphaned resource. That’s why you can’t delete the “AzureBackupRG” resource group—it’s expected behavior enforced by Azure.
Here’s how to clean up the restore point collection and resolve the issue:
First, locate the hidden restore point collection. Log into the Azure portal and navigate to ‘Resource groups’. Find the “AzureBackupRG_region_number” resource group. To see the hidden resources, turn on the “Show hidden types” option from the top menu. You will spot a resource of type “Microsoft.Compute/restorePointCollections,” usually named with your VM’s name and a series of numbers.
Next, try deleting the restore point collection directly from the portal. If the portal doesn’t allow deletion, use Azure PowerShell or Azure CLI, which are reliable and supported methods.
With PowerShell, run:
Remove-AzResource -ResourceGroupName "AzureBackupRG_region_number"
-ResourceType “Microsoft.Compute/restorePointCollections” -Name "AzureBackup_VMName_numbers"
-Force
Using Azure CLI, execute:
RESOREPOINTID=$(az resource list -g AzureBackupRG_region_number \
–resource-type Microsoft.Compute/restorePointCollections \
–query “[?starts_with(name, ‘AzureBackup_VMName’)].id” -o tsv)
az resource delete –ids $RESTOREPOINTID
Executing these commands will remove the instant restore snapshots, but it doesn’t affect vault data (which you’ve already deleted).
Sometimes, you might see an error saying there’s an active shared access signature (SAS) attached to the restore point. This means a SAS token is still linked to the disk restore point, and you’ll need to revoke it using the REST API before attempting deletion again. Microsoft provides documentation for this process here.
After revoking any SAS, try deleting the restore point collection again using PowerShell or CLI.
Once all restore point collections are removed, the hidden resource group should be able to delete normally. If it still doesn’t delete, run:
Remove-AzResourceGroup -Name “AzureBackupRG_region_number” -Force
If you encounter persistent issues, such as errors related to SAS tokens or locks, note down the exact message and seek further assistance. Providing these details can help troubleshoot more effectively.
Following these steps should help you clean up the orphaned resource and fully delete the backup restore point collection.
