Soft delete for Azure Virtual Machines (VMs) is an Azure Backup security feature that protects your IaaS VM backups from unintended or malicious deletion. Even if an Azure Administrator or another user with the necessary RBAC rights, stops and deletes a VMs backup data, it retains this data for an additional 14 days and allows for the recovery of it without any data loss.
Soft delete is enabled by default, and can be used without any additional cost. It not only protects deleted backup data for Azure IaaS VMs, but also for SQL Server or SAP HANA running in an Azure IaaS VM.
Restore a VM from soft-delete
To restore a VM from soft-delete, logon to the Azure Portal and go to the recovery services vault holding the backup data. Under Protected items, click on Backup items and select Azure Virtual Machine.
Select the VM you want to restore from soft delete. The VM or VMs will appear with a red soft-delete icon next to it.
Undelete the soft-deleted VM by selecting Undelete.
On the opened window, click on Undelete to undelete all restore points for that specific VM. Keep in mind that this will allow you to restore the VM but this will not automatically re-enable backup.
To restore the VM, close the Backup Item blade by clicking on the close button at the righthand side. Then select the VM and click on the ellipsis symbol and select Restore VM.
Select the restore point you want to use.
Then select the Create new option (the VM is already deleted in my Azure environment) or Replace existing and fill in all the parameters. Then click on Restore to start the restore process.
Like the notification indicates, you can monitor the restore process on the Backup Jobs page, which you can open under Monitor and by selecting Backup Jobs.
When the restore is completed you can check if the VM is up and running under the Virtual machines blade. If all went well the VM should be running, and the Source should be showing Disk. You can now use your VM as before.
Soft-delete for Azure IaaS VMs, is an Azure Backup feature which allows you to restore a VM within 14 days after an accidental or malicious removal of the backup data. In this way it foresees an extra layer of security for your Cloud backup strategy.