Monitor and Maintain Azure Resources · Topic 2 of 2
Backup and Site Recovery
AZ-104 recovery: Recovery Services and Backup vaults, policies and instant restore, soft delete, Cross Region Restore and Site Recovery failover.
- 5 min
- Includes a diagram
- Backup restores data. Site Recovery fails over to another region.
- A Recovery Services vault must be in the same region as the VMs. Backup vaults hold newer workloads.
- Vault redundancy is set before protecting items. Cross Region Restore needs geo redundant storage.
What it is
Azure has two services for two different disasters. Azure Backup protects data, so that you can restore a VM, a file share or a database to an earlier point. Azure Site Recovery protects availability, by replicating machines to another region so that you can fail over if the first region goes down.
How it works
Vaults
Backup data lives in a vault.
| Vault | Holds |
|---|---|
| Recovery Services vault | Backups of VMs, Azure Files, SQL Server and SAP HANA in VMs, and on premises machines. It also hosts Site Recovery |
| Backup vault | Backups of newer workloads, such as Azure Disks, Blobs and PostgreSQL |
A Recovery Services vault must be in the same region as the VMs it protects. You choose the vault's storage redundancy, which is locally redundant, zone redundant or geo redundant, before you protect anything. The default is geo redundant, and Cross Region Restore is available only with a geo redundant vault.
Backup policies
A backup policy has a schedule and a retention.
- The schedule sets how often a backup runs, for example daily at a set time.
- The retention sets how long recovery points are kept, in daily, weekly, monthly and yearly tiers.
- Instant restore keeps snapshots near the VM for a few days so that a restore is fast. For a standard policy the default is 2 days, and you can set 1 to 5.
You enable backup for a VM by choosing the vault and a policy, and Azure installs the backup extension.
Restore options
For a VM you can restore in several ways.
| Option | Result |
|---|---|
| Create new VM | A new machine from the recovery point |
| Replace existing | Overwrites the disks of the current VM |
| Restore disks | Creates disks that you attach yourself |
| File recovery | Mounts the recovery point so that you copy out single files |
Soft delete
Soft delete protects backups from deletion. Deleted backup data is kept for 14 days by default, and you can extend it up to 180 days, so that an accidental or malicious delete can be undone.
Azure Site Recovery
Site Recovery replicates Azure VMs to a second region continuously.
- Enable replication. Choose the target region and a replication policy. Azure creates the target resources and a cache storage account.
- Recovery points are kept according to the policy. The default retention is 24 hours.
- Test failover starts a copy in an isolated network. It does not affect production or replication, so you can rehearse safely.
- Failover starts the VM in the target region from a recovery point, and you commit it when you are satisfied.
- Reprotect reverses replication, and failback returns to the original region.
A recovery plan groups machines, sets the start order and can run scripts, so that a multi tier application comes up in the right sequence.
Reports and alerts
Azure Backup raises built in alerts for job failures. For reports, you send backup data to a Log Analytics workspace through a diagnostic setting, and then use the backup reports to see usage, job success and trends.
Backup consistency
A backup of a VM can be taken at different levels of consistency.
| Level | Meaning |
|---|---|
| Crash consistent | Like pulling the power: data on disk, but not what was in memory |
| File system consistent | The file system is flushed before the snapshot |
| Application consistent | Applications are quiesced, so databases are in a clean state |
Windows VMs can use the Volume Shadow Copy Service for application consistent backups, and Linux VMs can use scripts. Prefer application consistent backups for databases.
A retention example
A common policy takes a daily backup at night, keeps daily points for seven days, weekly points for four weeks, monthly points for twelve months and yearly points for several years. Longer retention costs more storage, so match it to the business need and any legal requirement.
Backup compared with Site Recovery
| Azure Backup | Azure Site Recovery | |
|---|---|---|
| Protects against | Data loss, deletion and corruption | A region or site outage |
| Restores | Data or a VM to a point in time | Machines running in another region |
| Recovery speed | Restore time depends on the data size | Failover in minutes with a plan |
What Site Recovery needs
Replicating an Azure VM needs a target region, a target resource group and virtual network, a cache storage account in the source region, and a replication policy. Network mapping decides which target network the failed over VM joins. Without a recovery plan, you fail machines over one by one.
How the exam asks about this
- "Restore a deleted VM to yesterday." Azure Backup.
- "Keep the app running when a region fails." Site Recovery.
- "Practise a failover safely." A test failover into an isolated network.
- "Restore in another region." Cross Region Restore, which needs a geo redundant vault.
- Choose the vault redundancy before protecting any item.
What to remember for the exam
- Backup restores data. Site Recovery fails over to another region.
- A Recovery Services vault must be in the same region as the VMs. Backup vaults hold newer workloads.
- Vault redundancy is set before protecting items. Cross Region Restore needs geo redundant storage.
- A policy has a schedule and retention. Instant restore defaults to 2 days for a standard policy, from 1 to 5.
- Soft delete keeps deleted backups for 14 days by default, up to 180.
- Site Recovery order: replicate, test failover, failover, commit, reprotect, failback.
- Backup reports need a Log Analytics workspace.
"Rehearse a disaster without affecting production" points to a test failover in an isolated network.
Common mistakes
Using Backup for regional disaster recovery. Backup restores data. Use Site Recovery to keep running in another region.
Choosing a vault in the wrong region. It must match the VM's region.
Changing redundancy after items are protected. Choose it first.
Running test failover on the production network. Use an isolated network.
Check yourself
Which service lets you fail a VM over to another region?
Azure Site Recovery.
How long is deleted backup data kept by default with soft delete?
14 days.
What is required to use Cross Region Restore?
A geo redundant Recovery Services vault.
Topic 2 of 2 in Monitor and Maintain Azure Resources
Test yourself on Monitor and Maintain Azure Resources
The full Microsoft AZ-104 question bank has 650 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Microsoft. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.