Restore Point Collection cannot be deleted

Charalampos Sarantoglou 31 Reputation points
2022-06-11T16:52:52.433+00:00

I studied Azure Backup by following the exercise in https://learn.microsoft.com/en-us/learn/modules/protect-virtual-machines-with-azure-backup/4-exercise-back-up-azure-virtual-machine
I tried to clean up the resources by deleting all resource groups as it says at https://learn.microsoft.com/en-us/learn/modules/protect-virtual-machines-with-azure-backup/7-summary
However an orphaned Restore Point Collection persists that gives me a 404 "Resource not found" error when I try to delete it.
How can I get rid of it?

Azure Backup
Azure Backup
An Azure backup service that provides built-in management at scale.
1,301 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,105 questions
0 comments No comments
{count} vote

Accepted answer
  1. Prrudram-MSFT 26,591 Reputation points
    2022-06-13T08:14:43.25+00:00

    Hello @Charalampos Sarantoglou ,

    Thank you for update, in addition to what @Anonymous and @Manu Philip suggested I would like to explain what has caused this issue and posting the possible resolutions to this issue.

    Backup service creates a separate resource group than the resource group of the VM to store restore point collection. The naming format of the resource group created by Backup service is: AzureBackupRG_<Geo>_<number>. For example: AzureBackupRG_westeurope_1

    If you remove backups from recovery service vault, it will delete all the restore points that are in vault and the restore points collection set has separate local snapshots(for instant restore) that are collected in the AzureBackupRG_westeurope_1 and are in hidden items as shown below.

    210703-image.png

    Symptoms: 404 "Resource not found" error when I try to delete teh resource

    Cause: You have removed this RG without deleting the restore point collection set that left stale entries of the restore points. This happens when there is a delay from the backend otherwise it shouldn't end up in this situation usually.

    Solution:
    You can recreate the RG and remove the restore point collection from hidden items like you did using PS

    Remove-AzResource -ResourceGroupName AzureBackupRG_westeurope_1 -name AzureBackup_NW-RHEL01_1847038797884137554 -Force -ResourceType Microsoft.Compute/restorePointCollections

    --please don't forget to upvote and Accept as answer if the reply is helpful--


2 additional answers

Sort by: Most helpful
  1. Manu Philip 18,696 Reputation points MVP
    2022-06-11T17:48:41.077+00:00

    As you have seen orphaned resources resides inside the resource group, try a force deletion of he resource group from the root level using Azure CLI

    Get-AzResourceGroup -Name "ContosoRG01" | Remove-AzResourceGroup -Force  
    

    If it doesn't work either, post the complete error message you see while executing the above command

    ----------

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    1 person found this answer helpful.

  2. AdamCzepiel-7967 1 Reputation point
    2022-12-13T23:43:47.257+00:00

    still cannot delete it

    { "shellProps": { "sessionId": "914cb04b6592412ea85e2553a6cb56ad", "extName": "HubsExtension", "contentName": "ResourceMenuBlade", "resourceId": "/subscriptions/xxxxx/resourceGroups/backup/providers/Microsoft.Compute/disks/acz-ub-2204_OsDisk_1_391792684d134f478091ed216f4740bd" }, "error": { "message": "Resource not found", "code": 404, "details": { "htmlTemplate": "The resource was not found, it may have been deleted. If this was launched from a pinned tile on the dashboard, it should be removed.<br /><br />Resource ID: /subscriptions/c2a58af5-4498-41da-9340-9792fd2940d7/resourceGroups/backup/providers/Microsoft.Compute/disks/acz-ub-2204_OsDisk_1_391792684d134f478091ed216f4740bd<br /><br />Status Code: 404<br /><br />Status Message: The Resource 'Microsoft.Compute/disks/acz-ub-2204_OsDisk_1_391792684d134f478091ed216f4740bd' under resource group 'backup' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix" } }}

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.