Delete Azure RestorePointCollections

Tafadzwa Mukorombindo 21 Reputation points

We are trying to move some resources to another subscription, however we need to delete the restorePointCollections. This is taking ages from the Azure portal when it works (like 15-30mins) and also failing more than its working. Anyone got a script to do this from PowerShell or something please?

Azure Backup
Azure Backup
An Azure backup service that provides built-in management at scale.
1,191 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Leon Laude 85,726 Reputation points


    As far as I know it's not possible to delete restore points with PowerShell as of writing this.

    There are two ways to delete a VM's backup data:

    1. From the vault item dashboard, select Stop backup.
    2. From the vault item dashboard, select Delete backup data. This option is enabled if you had chosen to Stop protection and retain backup data option during stop VM protection.


    Best regards,

  2. Alexander Schaepper 1 Reputation point

    Hello together

    I had quite a similar issue and want to share my findings.

    I actually was trying to move the virtual machine as well to another subrscription. On this way I missunderstood a message I think and I deactivated the backup job in a vault in this ressource, and then deleted it. So there was an ongoing soft deletion in progress.

    It looks like this softdeletion was somehow interlinked to this RestorePointCollection, in my case I actually never got an error message when trying to delte this Colleciton and it took forever.

    So wat I did was from this:

    • Deactivated the soft deletion feature.
    • And then restore the item from the soft delete state.
    • Delete this item from the vault.

    And then finally went to the backup ressource group where this RestorePointCollection was in, and then I could delete it.

    After that I was able to move the vm.

    0 comments No comments

  3. Rob Perrett 1 Reputation point

    I got an 'internal system error' while trying to delete the restore point. This was because the VM had already been deallocated. I turned it back on, then was able the delete the restore point successfully, then shut the VM down again.

    0 comments No comments

  4. Henry Wojteczko 1 Reputation point

    Both Azure Powershell and AZ CLI work. I do not advocate doing the same in the portal for reasons previously stated in this post. The ambiguity in the Microsoft Doclink is in how it specifies the resource group. Running the command like "$rp = Get-AzResource -ResourceGroupName * -ResourceType Microsoft.Compute/restorePointCollections" will build a list of dictionary objects that represent the resource. This could then be fed into a for loop as Microsoft describes in [4] of the document to call Remove-AzResource, or you could constrain the for loop to check for a list of only those objects to select that match a particular resource group name. It would be simple to build a python script that could accomplish the same using AZ CLI.

    0 comments No comments