Module 10: Backup and Disaster Recovery

Module 10Level 3Azure Administrator

Backup and Disaster Recovery

Protecting the Snips environment·45 minutes

Azure Backup overviewRecovery Services vaultsVM backup policiesFile and folder backupAzure Site Recovery concepts+4 more
The situation

What would happen if the VM was deleted?

The Head of Digital & IT has asked a simple question: "What would happen if someone accidentally deleted the Contractor Document Portal VM?" You realise Snips has no backup strategy for its Azure resources. The VM has been running for a month with no protection.

This module fixes that. You will design and implement a backup strategy for the Snips environment, understand the difference between backup and disaster recovery, and learn how to restore from a backup when things go wrong.

What you will learn

Azure Backup overview
Recovery Services vaults
VM backup policies
File and folder backup
Azure Site Recovery concepts
RTO and RPO
Backup monitoring and alerts
Restoring from backup
Soft delete

RTO and RPO

Before designing a backup strategy, you need to understand what the business requires. Two key metrics define the requirements:

RPO — Recovery Point Objective

The maximum acceptable data loss measured in time. If RPO is 4 hours, backups must run at least every 4 hours. In the worst case, you lose 4 hours of data.

RTO — Recovery Time Objective

The maximum acceptable time to restore service after a failure. If RTO is 2 hours, the system must be back online within 2 hours of a failure being declared.

For the Contractor Document Portal, a reasonable starting point is RPO = 24 hours (daily backup) and RTO = 4 hours (restore from backup within 4 hours). If the business requires better than this, Azure Site Recovery can provide near-zero RPO and RTO of minutes.

Azure Backup and Recovery Services vaults

Azure Backup stores backup data in a Recovery Services vault — a separate resource that provides an independent recovery point even if the original resource is deleted.

Recovery Services vault

The container for backup data and Site Recovery replication data. Exists independently of the resources it protects. Can protect resources across multiple resource groups.

Backup policy

Defines the backup schedule (daily, weekly) and retention period (how long recovery points are kept). The DefaultPolicy takes a daily backup and retains it for 30 days.

Soft delete

Retains deleted backup data for 14 days (configurable up to 180 days). Protects against accidental or malicious deletion of backup data. Enabled by default on new vaults.

Always create the Recovery Services vault in a different resource group from the resources it protects. If someone deletes the resource group containing the VM, the vault and its recovery points survive in the separate backup resource group.

VM restore options

When you need to restore a VM, Azure Backup offers four options. Select each to understand when to use it:

VM restore options

Select an option to understand when to use it.

Azure Site Recovery

Azure Backup provides point-in-time recovery with an RTO measured in hours. Azure Site Recovery (ASR) provides continuous replication with an RTO measured in minutes.

Replication

ASR continuously replicates VM data to a secondary region. Recovery points are created every few minutes, giving a near-zero RPO.

Test failover

Spin up the replicated VM in the secondary region without affecting production. Use this to verify your DR plan works before you need it.

Failover

Switch production traffic to the secondary region. Can be initiated manually or automatically based on an alert.

Failback

After the primary region recovers, replicate changes back and switch production traffic back to the primary region.

Configuring backup with Azure CLI

bash
# Create a Recovery Services vault
az backup vault create \
  --resource-group rg-backup-prod-uks-001 \
  --name rsv-snips-prod-uks-001 \
  --location uksouth

# Enable soft delete (recommended)
az backup vault backup-properties set \
  --resource-group rg-backup-prod-uks-001 \
  --name rsv-snips-prod-uks-001 \
  --soft-delete-feature-state Enable

# Enable backup for a VM
az backup protection enable-for-vm \
  --resource-group rg-backup-prod-uks-001 \
  --vault-name rsv-snips-prod-uks-001 \
  --vm vm-contractordocportal-prod-uks-001 \
  --policy-name DefaultPolicy

# List recovery points
az backup recoverypoint list \
  --resource-group rg-backup-prod-uks-001 \
  --vault-name rsv-snips-prod-uks-001 \
  --container-name vm-contractordocportal-prod-uks-001 \
  --item-name vm-contractordocportal-prod-uks-001 \
  --workload-type VM
Hands-on lab: Protect the Snips environment
  1. 1.Create a Recovery Services vault in a separate resource group from the VM.
  2. 2.Enable soft delete on the vault.
  3. 3.Enable backup for the Contractor Document Portal VM using the DefaultPolicy.
  4. 4.Trigger an on-demand backup and wait for it to complete.
  5. 5.List the recovery points and identify the most recent one.
  6. 6.Perform a file recovery to restore a single file from the backup.

1.Where are Azure VM backups stored?

2.Snips needs to recover the Contractor Document Portal VM to its state from 3 days ago. Which restore option replaces the existing VM with the restored version?

3.What does RPO stand for and what does it measure?

4.A VM backup was accidentally deleted. Soft delete is enabled on the Recovery Services vault. What happens?

5.Snips wants to replicate the Contractor Document Portal VM to a secondary Azure region so it can be brought online quickly if the primary region fails. Which service provides this?

Module summary

The Snips environment is now protected. Daily backups are running, soft delete is enabled and you know how to restore from a recovery point. You understand the difference between backup (point-in-time recovery) and Site Recovery (continuous replication for DR).

Ready to mark this module complete?

Mark complete when you have read all sections, attempted the lab and completed the knowledge check.

AZ-104 objectives covered
  • Monitor and maintain Azure resources