Use soft delete to recover Azure VMs
The default behavior when you delete a backup is that the backup is deleted and lost forever. When soft delete is enabled, you can save and recover your data when backup data are deleted even in the event of an overwrite. This feature must be enabled in the Recovery Services vault. Choose Properties, Security Settings to see soft delete options (see Figure 5-47). When you use soft delete, backup data is retained for 14 days after deletion.
FIGURE 5-47 Enabling soft delete for a Recovery Services vault
If the soft delete option is enabled, you can delete the backup data by clicking Stop Backup and then clicking Delete Backup Data. You will be prompted to provide a reason for deleting backup data that will be stored with the activity log of the deletion. Once deleted, your soft- deleted backup item will appear, as shown in Figure 5-48.
FIGURE 5-48 Soft delete–enabled backup item after deletion
You can click Undelete anytime within 14 days of the retention period (see Figure 5-49). Once the data is restored, you can click Resume Backup again.
FIGURE 5-49 Undelete option for soft-deleted ExamRef-VMs
Every organization will have its own business continuity and disaster recovery (BCDR) plans to handle unpredictable circumstances with unexpected outages that occur. Azure Site Recovery service enables you to replicate, failover, and failback virtual machines as needed. Azure Site Recovery solution addresses these major replication scenarios:
- Azure VMs from one region to another
- On-premises VMs (VMware, Hyper-V, and physical servers) to Azure
- On-premises VMs to another site
Suppose you need to replicate Azure VMs from one region to another, as an example. First, you would need to create a Recovery Services vault. As a best practice, you should always validate the target subscription readiness by checking the appropriate VM SKU and major feature availability. You also need to take into consideration the regions that you are using. For cross-region recovery, the vault and the resource group the vault is deployed to must be in a different region than the VMs that you are replicating.
For enterprise environments, you should also consider allow-listing the URLs for outbound connectivity to required Azure resources and service tag-based NSG rules. You would also need minimum Site Recovery Contributor rights for configuring the replication and Site Recovery Operator rights for executing the failover and failback operations.
To enable replication from a source VM, follow these steps:
- Open the Recovery Services vault and click Site Recovery.
- On the Site Recovery blade, under Azure Virtual Machines, click Enable Replication.
- On the Source tab, provide the source details, such as the location, deployment model, subscription, and source resource group, as shown in Figure 5-50.
FIGURE 5-50 Source configuration when enabling replication
4. On the next tab, select the source VM for replication (see Figure 5-51).
FIGURE 5-51 Source VM selection when enabling replication