Delete Azure RestorePointCollections

Tafadzwa Mukorombindo 21 Reputation points
2020-06-02T11:05:48.5+00:00

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,122 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Leon Laude 85,651 Reputation points
    2020-06-02T11:17:54.313+00:00

    Hi,

    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.

    Reference:
    https://learn.microsoft.com/en-us/azure/backup/backup-azure-manage-vms#delete-backup-data

    Best regards,
    Leon


  2. Alexander Schaepper 1 Reputation point
    2020-08-19T14:35:50.127+00:00

    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:
    https://learn.microsoft.com/en-us/azure/backup/backup-azure-delete-vault

    • 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
    2020-09-21T23:09:34.75+00:00

    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
    2020-11-19T19:16:55.917+00:00

    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 https://learn.microsoft.com/en-ca/azure/azure-resource-manager/management/move-limitations/virtual-machines-move-limitations 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