Azure Site Recovery: Disaster Recovery and Business Continuity for Servers and Applications

Azure Site Recovery: Disaster Recovery and Business Continuity for Servers and Applications

A beginner-friendly, book-style guide to Azure Site Recovery. Learn how replication, recovery points, recovery plans, test drills, failover, and failback work, how to design for recovery time and data loss targets, and how to secure, cost, monitor, and troubleshoot disaster recovery in production.

Imagine a bakery that supplies bread to a whole town. One night a pipe bursts above the ovens, and by morning the kitchen is flooded. The owner has recipes in her head, ingredients in the cellar, and orders for two thousand loaves. If she has no plan, the town goes without bread for weeks. If she has a second kitchen across town, with a copy of the recipes, a stock of flour, and a checklist that says exactly who does what, the bakery is open again by lunchtime and customers barely notice.

Every company that runs computer systems is that bakery. Data centers flood, lose power, catch fire, suffer cyberattacks, or fail through plain human error. Whole cloud regions can have outages, rare but real. Azure Site Recovery is Microsoft’s service for building the second kitchen: it keeps a continuously updated copy of your servers in another place and lets you switch to that copy when the first place fails.

This guide assumes you know nothing about the topic. Every new term is explained the first time it appears, every big idea has an everyday comparison, and the chapters build on each other. By the end you will understand what disaster recovery is, how Azure Site Recovery works inside, how to plan and rehearse a recovery, how to protect Azure, VMware, Hyper-V, and physical servers, how to keep costs sensible, and how to find and fix problems.

1The Problem: When the Building Disappears

Before meeting any tool, understand the pain it removes. Once the pain is clear, every feature of Azure Site Recovery looks sensible instead of random.

Things go wrong, even in the cloud

People often believe that moving to the cloud makes outages impossible. It makes many failures rarer, but it does not abolish them. Cloud providers build data centers with great care, yet a facility can still lose power, a network cable can be cut, a software update can go wrong, or a natural disaster can strike a region. Inside your own organisation, a mistaken command can delete servers, and ransomware can lock every disk. Disaster recovery is the discipline of being ready for such days.

Nature

Fire, flood, storm, earthquake

A whole site can be unreachable for days. Backups stored in the same building are lost along with the servers.

Infrastructure

Power and network failures

A utility fault, a cooling failure, or a broken network link can take down everything in one location.

Provider

Regional service incidents

Rarely, a cloud service in a region suffers a prolonged problem affecting many customers at once.

Human

Mistakes and bad changes

A wrong script, a faulty deployment, or an administrator deleting the wrong resource group.

Attack

Ransomware and sabotage

Attackers encrypt or destroy systems. Recovery needs clean copies the attacker cannot reach.

Compliance

Regulation and contracts

Banks, hospitals, and government suppliers are often required to prove they can recover within set times.

Two numbers that rule everything

Disaster recovery planning revolves around two measurements. The first is the Recovery Point Objective (RPO): how much recent data you can afford to lose, measured in time. An RPO of five minutes means that after a disaster you may lose, at most, the last five minutes of work. The second is the Recovery Time Objective (RTO): how long the business can stay down, measured from the disaster until service is running again. An RTO of one hour means the systems must be back within sixty minutes.

Analogy

Picture a writer working on a novel. The RPO is how much writing she is willing to redo: if she saves every five minutes, the worst case is rewriting five minutes of text. The RTO is how long she can wait to resume writing after her laptop dies: if she keeps a spare laptop ready on the desk, she is back in minutes, but if she must order a new one, she is back in days.

RPO
how much data you can lose, measured in time
RTO
how long you can be down before service returns
1 drill
teaches more than a hundred pages of plans

Backups are not enough

A backup is a stored copy of data from a past moment. If you lose data, you restore it. Backups are essential, but restoring a large environment from backups can take hours or days: servers must be rebuilt, networks configured, data copied back, and applications started in the right order. A disaster recovery solution keeps a nearly ready copy of whole servers in another location, so that recovery means switching on prepared machines rather than rebuilding from scratch. The two are partners, not rivals: backups protect against deletion and corruption over time, while disaster recovery protects against loss of a whole site or region with short downtime.

The old way was painful and expensive

Traditionally, companies built a second data center with matching hardware, matching software, and a team to keep them in sync. It sat mostly idle, cost nearly as much as the first, and was tested rarely because tests were hard. When a real disaster came, many discovered that the copy was out of date or that no one remembered the startup order. The cloud changes the economics: the copy can live in Azure storage at modest cost, and the compute that runs the machines is paid for only when you actually fail over.

An illustrative example

Consider a hypothetical online insurance company with a customer portal, a policy database, and a payment gateway, running on 40 virtual machines in a data center. Management sets an RPO of 15 minutes and an RTO of two hours. With Azure Site Recovery, all 40 machines are replicated continuously to Azure. Every quarter, the team runs a test failover into an isolated network and checks that the portal works. When a real fire damages the data center, they run one recovery plan, the machines start in the correct order in Azure, the DNS record is updated, and customers are back within the hour with at most a few minutes of data lost.

2Core Concepts: The Vocabulary of Site Recovery

Azure Site Recovery has a modest vocabulary. Learn these words once, and every later chapter reads easily.

The words, one at a time

TermPlain meaningEveryday comparison
Source (primary) siteThe place where your servers normally runThe main kitchen
Target (recovery) siteThe place where copies are kept and where you switch to in a disasterThe second kitchen across town
ReplicationContinuously copying changes from the source servers’ disks to the targetPhotocopying each new page as it is written
Recovery Services vaultThe Azure container that holds Site Recovery settings, replication state, and recovery plansThe head office filing cabinet for the recovery operation
Replication policySettings for how long recovery points are kept and how often consistent snapshots are takenThe rules for how many copies of the recipe book to keep
Recovery pointA saved moment in time that you can recover toA dated photo of the kitchen
Crash-consistent pointA copy of the disk exactly as if the power had been pulled at that momentA photo taken mid-bake
Application-consistent pointA copy taken after applications finished writing their data in a tidy wayA photo taken after the oven was properly switched off
FailoverSwitching from the source to the target so that the copy becomes the live systemMoving operations to the second kitchen
FailbackReturning to the original site after it has been repairedMoving back to the main kitchen after repairs
ReprotectReversing the direction of replication after a failover so the new live site is protectedSetting up a new spare kitchen after the move
Test failoverA safe rehearsal that starts copies in an isolated network without affecting productionA fire drill
Recovery planA scripted order of steps for failing over many servers togetherThe evacuation checklist
Network mappingA rule telling Site Recovery which target network matches which source networkA map between the old street plan and the new one

A mental picture in five lines

You create a vault. You choose which servers to protect and a policy for them. Site Recovery starts replicating their disks to the target, and keeps a rolling set of recovery points. You build a recovery plan and rehearse it with test failovers. In a real disaster, you run a failover, choose a recovery point, and the replicated copies start as live servers. Later, you reprotect and fail back once the original site is healthy.

Analogy

Think of a theatre with an understudy for every actor. The understudies watch every rehearsal and learn each change in the script as it happens, but they do not appear on stage and are not paid as lead actors. If the lead falls ill, the understudy steps in, using the latest script. Replication is the understudy studying every day, the recovery plan is the stage manager’s call sheet, and failover is the moment the understudy walks on.

What is and is not stored while waiting

While replication runs, the target holds only the disks of your servers (as storage), not running machines. The compute, meaning the processors and memory that actually run the server, is not charged until you perform a failover or a test failover. This is the central reason why Site Recovery is far cheaper than keeping a full duplicate environment running.

i
Tip

Remember the pair “RPO is about data, RTO is about time.” When people argue about how much to spend on disaster recovery, translate the argument into those two numbers per application, and the discussion becomes concrete.

3What Azure Site Recovery Is, and How It Differs from Its Neighbours

Azure has several features that sound alike: backup, availability zones, geo-redundant storage, and migration tools. Putting Site Recovery beside them makes its job clear.

A short history

Microsoft first offered a disaster recovery service for Hyper-V virtualisation hosts in the early 2010s, orchestrating replication between a company’s own sites. It soon grew to protect VMware machines and physical servers by replicating to Azure, and later to protect Azure virtual machines by replicating them from one Azure region to another. The service name settled as Azure Site Recovery, often shortened to ASR. Over the years it also served as a migration tool, since failing over a replicated server into Azure is effectively moving it. Today, Microsoft recommends Azure Migrate for new migrations, while Site Recovery stays focused on disaster recovery, and the two tools share some technology.

What Azure Site Recovery does

Replicate

Continuous copying

Keeps a nearly current copy of server disks in another region or in Azure, with low data loss targets measured in seconds to minutes.

Orchestrate

Recovery plans

Starts many servers in a defined order, with pauses, manual steps, and automation scripts, so complex applications come up correctly.

Rehearse

Non-disruptive testing

Runs copies in an isolated network to prove that recovery works, without touching production or interrupting replication.

Switch

Failover and failback

Moves the live workload to the recovery site, and later back, with reversed replication.

Cover

Many platforms

Azure virtual machines, VMware virtual machines, Hyper-V virtual machines, and physical servers.

Report

Health and compliance

Shows replication health, achieved recovery point times, test results, and job history that auditors can use.

Site Recovery versus Azure Backup

QuestionAzure BackupAzure Site Recovery
Main purposeRestore data after deletion, corruption, or ransomwareKeep applications running after loss of a site or region
Typical recovery pointDaily or more frequent snapshots, kept for weeks to yearsContinuous replication with recovery points kept for hours to days
Recovery speedMinutes to hours, depending on sizeMinutes to an hour or two, depending on the plan
RetentionLong-term historyShort-term, a rolling window
Unit restoredFiles, disks, or whole machinesWhole machines in another location
Cost patternPer protected instance plus backup storagePer protected instance plus replica storage; compute only after failover
Analogy

Backup is the family photo album kept in a safe: it lets you look back at how things were on a specific date, even years ago. Site Recovery is the spare apartment, already furnished, that you can move into tonight if your house burns down. Everyone needs both: the album will not give you a bed tonight, and the spare apartment will not show you how the house looked two years ago.

Site Recovery versus built-in redundancy

FeatureWhat it protects againstWhat it does not do
Availability setsFailures of individual hardware racks and maintenance events inside one data centerDoes not protect against loss of the whole data center
Availability zonesFailure of one data center building inside a region, by spreading machines across zonesDoes not protect against a regional problem; may need the application to be built across zones
Geo-redundant storageLoss of a region for stored data, which is copied to a paired regionDoes not restart your servers or applications
Azure Site RecoveryLoss of a zone, a data center, or a region, for whole virtual machinesDoes not protect PaaS data services by itself; those have their own replication features
Redundancy keeps you running through small failures. Disaster recovery brings you back from the large ones.

Site Recovery and migration

You may see guides that use Site Recovery to move servers into Azure. That works, because replicating and failing over is a form of migration. For migrations, Microsoft’s current guidance centres on Azure Migrate, which provides discovery, assessment, and a replication engine. This guide focuses on disaster recovery, and notes where migration uses the same ideas. Check the current documentation for which tool is recommended for your scenario.

!
Watch out

Supported operating systems, disk limits, regions, and features change often. Treat the numbers and lists in this book as orientation only, and confirm them against the current support matrix on Microsoft’s documentation before designing for production.

4Architecture: The Pieces and Where They Sit

The architecture depends on what you protect. We start with the most common case, Azure virtual machines replicated to another Azure region, then look at servers outside Azure.

flowchart LR
  subgraph SRC["Source region"]
    VM1["Protected VM with Mobility service extension"]
    DSK["Source managed disks"]
    CACHE["Cache storage account"]
    VM1 --- DSK
    VM1 --> CACHE
  end
  subgraph VAULT["Recovery Services vault"]
    CTRL["Site Recovery control plane and recovery plans"]
  end
  subgraph TGT["Target region"]
    REP["Replica managed disks"]
    TVN["Target virtual network"]
    TRG["Target resource group"]
  end
  CACHE -->|"changes sent over Azure backbone"| REP
  VM1 -.->|"health and status"| CTRL
  CTRL -.->|"orchestrates failover"| TGT
  REP -->|"on failover, new VM is created from disk"| TVN
Figure 4.1: Azure-to-Azure disaster recovery architecture

Azure to Azure

This design protects virtual machines that already live in Azure. When you enable replication, Site Recovery installs a small Mobility service extension inside each virtual machine. The extension watches for writes to the disks and sends changes to a cache storage account in the source region. From there, a Site Recovery process copies the changes over Microsoft’s private backbone network to replica managed disks in the target region. The target region has a resource group, a virtual network, and subnets prepared by you or created automatically. No target virtual machine exists until failover; the replica disks simply wait.

Analogy

The cache storage account is a loading dock. Changes from the busy warehouse are placed there quickly in small parcels, then trucks carry them to the distant warehouse in a steady stream. The loading dock lets the main warehouse keep working without waiting for the long drive.

Servers outside Azure

SourceKey componentsNotes
VMware virtual machinesA replication appliance on-premises, the Mobility service on each protected machine, and the vault in AzureThe appliance collects changes, compresses and encrypts them, and sends them to storage in Azure. Older designs used a configuration server and process servers, which have been largely replaced by the newer appliance
Physical serversThe same appliance and Mobility service installed on each physical machineWorks for Windows and Linux physical machines that are supported
Hyper-V virtual machinesA Site Recovery provider and a recovery agent installed on the Hyper-V hostsWith or without System Center Virtual Machine Manager; hosts send data directly to Azure storage

The common parts

Control

Recovery Services vault

The Azure resource that holds replication configuration, recovery plans, policies, and job history. It lives in the target region for Azure-to-Azure setups, so that it remains available during a source region disaster.

Agent

Mobility service

Runs inside the protected machine and captures disk changes. It needs network access to the appliance or cache, and permission to take consistent snapshots.

Storage

Cache and replica storage

Temporary storage for change data on the source side, and persistent storage of replicated disks on the target side.

Network

Network mappings

Define which target virtual network and subnet each source network corresponds to.

Plan

Recovery plans

Group machines, set the startup order, and attach scripts and manual steps.

Access

Roles and identities

Built-in roles control who may configure, operate, and view disaster recovery.

Why the vault sits in the target region

If the vault lived in the same region as the protected machines and that region failed, you could not reach the tool that orchestrates recovery. For Azure-to-Azure protection, the vault belongs in the target region, the one that survives the disaster. For on-premises sources, the vault is in the Azure region where you want to recover.

Region pairs and choices

Azure regions come in pairs, two regions in the same geography that are designed to be far enough apart to avoid sharing a single disaster, for example separate cities. Many companies pick the paired region as their target for simplicity. You can also choose other regions in the same geography when data-residency rules allow, or when you need specific services or capacity. Check that the target region offers the virtual machine sizes and features your workloads need, and that your subscription has enough quota there.

!
Watch out

A very common surprise is a failover that fails because the target region has no available quota for the virtual machine cores you need. Quota is allocated per subscription per region. Request increases for the target region before you need them.

5How Replication Works Inside

Follow a single disk write from a running server to its copy in another region, and you will understand almost everything about replication behaviour.

sequenceDiagram
  participant App as Application on VM
  participant MS as Mobility service
  participant CS as Cache storage
  participant ASR as Site Recovery service
  participant RD as Replica disk in target
  App->>MS: Write to disk
  MS->>MS: Capture the changed blocks
  MS->>CS: Upload changes to cache
  CS->>ASR: Changes available for processing
  ASR->>RD: Apply changes to replica disk
  MS->>MS: Every few minutes mark a crash consistent point
  MS->>MS: On schedule request application consistent snapshot
  ASR->>ASR: Store recovery point and remove expired points
  ASR-->>MS: Replication health reported to vault
Figure 5.1: The path of a disk change during replication

Phase one: initial replication

When you first enable protection, the service must copy the entire contents of each disk to the target. This is the initial replication, and its time depends on the amount of data and the network capacity. A machine with 500 gigabytes of used data can take hours. During this phase the machine is not yet protected, and the health status shows it. Do not count the machine as covered until initial replication has finished and a first recovery point exists. Plan the start for a quiet period, and for on-premises sources consider the impact on your internet link.

Phase two: ongoing replication (delta)

After the first copy, only changes travel. The Mobility service tracks which blocks of the disk have been written and sends them as they happen. This is why the target stays within seconds or minutes of the source. The size of these changes per second is called data churn. A quiet web server has low churn. A busy database may have very high churn, and every disk type has limits on how much churn Site Recovery can handle, as documented by Microsoft. If churn exceeds what the network or the limits allow, replication falls behind and the actual RPO grows.

Analogy

Initial replication is like moving a whole library to a new building by truck: slow and heavy, but done once. Ongoing replication is like handing a courier every new book as it arrives. If books arrive faster than the courier can carry them, the new library falls behind.

Recovery points

While changes flow, Site Recovery marks recovery points, moments you can later choose to start from. Two kinds exist.

  • Crash-consistent recovery points are created frequently, typically every few minutes. They capture all disk writes up to a moment, but not data still sitting in application memory. Starting from such a point is like restarting a computer after a sudden power cut. Operating systems and well-designed databases usually recover fine, but this is not guaranteed.
  • Application-consistent recovery points are created less often, on a schedule you choose in the policy, commonly every few hours. Before taking one, the service asks the operating system, using a snapshot facility such as Windows Volume Shadow Copy Service or Linux pre- and post-scripts, to tell applications to flush data and pause writes briefly. The result is a tidy copy where applications start cleanly.
TypeHow often (typical)StrengthLimitation
Crash-consistentAbout every 5 minutesFrequent, low impact, small data loss windowApplications may need recovery on start; a few may not start cleanly
Application-consistentConfigured, often every few hoursClean application state, best for databasesLess frequent; brief pause or load while taken; may fail if the snapshot facility is unhealthy
Multi-VM consistentChosen in a replication groupAll machines in a group share a common point in timeAdds load, and can hurt performance for busy machines; use only when needed

Retention

The replication policy sets how long recovery points are kept. Because points are stored as changes on top of the replica disks, keeping more of them uses more storage. The default is short, commonly 24 hours, and the maximum is measured in days, not months. If you need to recover to a time months ago, that is a job for backup, not Site Recovery.

RPO in practice

For Azure-to-Azure, the achieved RPO is usually seconds to a few minutes, but it is not a promise. It depends on churn, network throughput, and the health of the service. The portal shows the current RPO per machine, and you can set alerts if it exceeds your threshold. Treat the displayed figure as your real-time measurement, and set the alert threshold lower than your business target so that you have time to react.

What is replicated and what is not

  • Replicated: the operating system disk and data disks attached to the machine, with their contents.
  • Not replicated automatically: shared resources outside the machine such as load balancers, firewalls, DNS records, key vaults, and platform databases. You must plan for these separately, usually with infrastructure as code in the target region.
  • Memory contents: not captured. Recovery starts the machine fresh from its disk, so running processes restart.
i
Tip

Disks that change heavily with temporary data, such as scratch space or page files, waste replication capacity. Exclude disks that hold only disposable data, where the product allows it, and place temporary files on local temporary storage that is not replicated.

6What You Can Protect: Scenarios and Boundaries

Site Recovery supports many sources and targets, but not everything. Knowing the boundaries early prevents unpleasant discoveries during a disaster.

Supported scenarios at a glance

FromToTypical use
Azure region AAzure region BRegional disaster protection for Azure virtual machines
Azure availability zone 1Azure availability zone 2 in the same regionZone-to-zone protection for workloads that cannot be re-architected across zones
VMware virtual machines on-premisesAzureReplace a secondary data center with Azure as the recovery site
Physical serversAzureProtect servers that are not virtualised
Hyper-V virtual machinesAzureProtect Microsoft virtualisation hosts
Other clouds’ virtual machinesAzureTreated as physical servers using the Mobility service; check support
!
Watch out

Microsoft has been changing options for on-premises VMware and Hyper-V sources, such as new replication appliances and new management experiences. Always follow the current setup guide for your scenario, and check retirement notices for older components.

Typical requirements for Azure virtual machines

  • The machine runs a supported Windows or Linux version. Very old or custom kernels may not work.
  • Disks are managed disks, or unmanaged disks within supported limits, and each disk is within the size limits.
  • The machine can reach required Azure service addresses outbound, so the Mobility service can talk to the cache storage and the service.
  • The target region supports the machine’s size, features, and any special hardware.
  • Certain features need extra attention: disk encryption, proximity placement groups, availability zones, ultra disks, and shared disks have specific rules.

What Site Recovery does not cover

Gap

Platform databases and services

Azure SQL Database, Cosmos DB, and storage accounts are not virtual machines. They have their own geo-replication, failover groups, and redundancy settings that you must configure.

Gap

Network infrastructure

Load balancers, application gateways, firewalls, VPN gateways, and DNS are not copied. Build them in the target region ahead of time.

Gap

Identity and secrets

Key Vault contents, managed identities, and access rules must be prepared in the target.

Gap

Unsupported workloads

Some clustering types, special hardware passthrough, or machines with certain disk configurations are not supported.

Gap

Long-term history

Only a short rolling window of recovery points exists. Use backup for older data.

Gap

Application correctness

The tool copies disks. Whether the application works after failover depends on dependencies such as addresses, licences, and connected systems.

Designing with the boundary in mind

Treat Site Recovery as the machinery for virtual machines, within a bigger disaster recovery design. A complete design lists every component of the application, decides how each one will be recovered, and puts the answers in a single document. A customer portal may have web servers (Site Recovery), a SQL database (geo-replication or a failover group), static files in storage (geo-redundant storage), a front door that sends traffic (global load balancer), and secrets (a second vault in the target region). Site Recovery handles one line of that list.

Analogy

An evacuation plan for a building is more than moving the people. It also covers the files, the safe contents, the phone lines, the keys, and the notice board that tells customers where to go. Site Recovery moves the people, in the form of the servers. The rest of the plan moves everything else.

i
Tip

Start with an inventory. List every application, its components, its owner, its RPO and RTO, and its dependencies. Rank applications by importance. You will find that only some need aggressive recovery targets, and that saves money.

7Setting Up Protection: Vaults, Policies, and Enabling Replication

Setup is a short sequence of decisions. Each decision has a consequence for cost, safety, and recovery speed.

The setup journey

1

Plan the target

Choose the target region, the target resource group, and the target virtual network with matching subnets. Confirm quota for the cores you will need during a failover.

2

Create a Recovery Services vault

For Azure-to-Azure, create the vault in the target region. Give it a clear name, tags, and access rules. One vault can protect many machines, but plan separate vaults for different environments or owners if you want separate permissions and reporting.

3

Create or choose a replication policy

Decide the recovery point retention and the frequency of application-consistent snapshots. Policies are reused across machines.

4

Enable replication for the machines

Select the virtual machines, confirm target settings per machine, and start. The service installs the Mobility extension and creates cache and replica resources. Initial replication begins.

5

Wait for protection to become healthy

Initial replication runs. When it completes, the machine shows as protected with a latest recovery point.

6

Create network mappings and recovery plans

Define how networks map and how machines will start in order. Then rehearse with a test failover.

The replication policy

SettingMeaningGuidance
Recovery point retentionHow long recovery points are kept, in hours or daysA day is common. Increase it if you need to roll back to before a bad change, remembering that storage cost grows
App-consistent snapshot frequencyHow often application-aware snapshots are taken, or offUse it for databases and applications that need clean starts. Do not set it so often that it harms performance
Multi-VM consistency (replication group)Groups machines so that they share common recovery pointsUse only for tightly coupled systems that must be consistent with each other, such as a clustered database
Analogy

The retention setting is how many dated photos of the kitchen you keep on the wall. Keep one day’s worth, and you can step back to any photo from yesterday. Keep ten days, and you have more choice, but you need a longer wall. The app-consistent frequency is how often you take a carefully posed photo with everything switched off and tidy, instead of a quick snapshot.

Per-machine target settings

For each protected machine you can control where its replica lives and what it will look like on failover: the target resource group, virtual network, subnet, availability setting, and disk type. You can also choose a different size for the target machine, which is useful for saving money when a smaller footprint is enough during an emergency, or when the same size is unavailable. Settings can be changed later, but some changes require disabling and re-enabling replication, so verify before you start.

Automation and scale

For more than a handful of machines, avoid clicking. Use Azure Policy to deploy replication to tagged machines, scripts or templates to enable protection, and Azure Resource Graph to report coverage. This ensures new virtual machines are not forgotten, a frequent source of failed disaster recovery tests: “we protected everything except the three servers added last month.”

Protecting machines you add later

  • Include protection in your standard build process, so that no server goes live without it unless approved.
  • Run a periodic report of machines in production that are not protected, and give owners a deadline.
  • When machines are resized, disks added, or networks changed, check that replication settings still match.
  • When machines are retired, disable replication so you do not pay to protect machines that no longer exist.
i
Tip

Tag protected machines with the name of their recovery plan and their tier. A tag-based report then answers questions like “which tier 1 servers are not yet protected?” in seconds.

8Networking for Disaster Recovery

A server that starts in the recovery site but cannot be reached is not recovered. Networking is the most common reason that disaster recovery plans fail on the day.

The core problem

Your source environment has addresses, firewall rules, load balancers, and name records that make it reachable and connected to other systems. A recovered virtual machine starts in a different network, possibly in a different geography. Unless you prepare the target network ahead of time, the machine may start with the wrong address, behind the wrong firewall, with no route to its database, and unknown to its users.

Network mapping

Network mapping tells Site Recovery which target network and subnet should host a failed-over machine from each source network and subnet. Without a mapping, the service picks a default or fails. For Azure-to-Azure, a mapping connects the source virtual network to the target virtual network. Plan address ranges so that the networks do not overlap if you want them connected.

flowchart TD
  USERS["Users on the internet"] --> GLB["Global traffic routing such as Front Door or Traffic Manager"]
  GLB -->|"normal operation"| LBP["Primary region load balancer"]
  GLB -.->|"after failover"| LBS["Secondary region load balancer"]
  LBP --> WEBP["Primary web VMs"]
  LBS --> WEBS["Recovered web VMs"]
  WEBP --> DBP["Primary database"]
  WEBS --> DBS["Recovered or replicated database"]
  DNS["Private DNS and name records"] --> WEBS
  FW["Firewall rules and NSGs prepared in secondary"] --> WEBS
  VPN["VPN or ExpressRoute to office"] --> LBS
Figure 8.1: Network pieces that must be ready in the recovery region

Addressing choices

ApproachHow it worksTrade-off
Same IP addresses in the targetThe target network uses the same ranges, and the recovered machine keeps its addressSimple for the application, but the two networks cannot be connected at the same time without overlap, which complicates testing and failback
Different IP addressesThe target has its own range, and each machine gets a new address, which you can reserve ahead of timeAllows both networks to be connected, but applications with hard-coded addresses and firewall rules need updating
Stretched networks (on-premises sources)The same subnet is made available at both sites through special network devicesKeeps addresses unchanged but adds complexity and risk

Whichever approach you choose, fix addresses for recovered machines in the settings so they are predictable. Applications should use names, not raw addresses, whenever possible, which makes address changes painless.

Names and traffic: DNS and global routing

Users reach your application through names such as portal.example.com. After failover, that name must lead to the recovered servers. There are two common ways. One is a DNS update: change the record to the new address, accepting that caches around the world will take time to expire, so set a short time to live (TTL) in advance. The other is a global traffic manager, such as Azure Front Door or Azure Traffic Manager, which watches health and sends users to whichever region is healthy. The second approach is faster and less manual, and is preferred for public applications.

Analogy

DNS is the phone book. If your bakery moves to a new street, you must update the phone book entry, and people with old copies will still call the old number for a while. A global traffic manager is like a call-forwarding service that automatically redirects callers to whichever shop is open, so nobody has to look anything up again.

Load balancers, firewalls, and security groups

  • Load balancers and application gateways are not replicated. Create equivalents in the target region and add recovered machines to their back-end pools, either through the recovery plan or through scripts. Site Recovery can attach recovered machines to a pre-created load balancer if you configure it.
  • Network security groups and firewall rules must exist in the target with matching rules. A forgotten rule means a recovered machine silently blocks traffic.
  • Public IP addresses in the target are different from the source. Plan for new public entry points.
  • Private connectivity such as VPN or ExpressRoute from offices and partners must also be available in the target region.
  • Dependencies on other systems such as identity servers, DNS servers, and monitoring must be reachable from the target network.

Connectivity for the service itself

The Mobility service and Site Recovery need outbound access to certain Azure service addresses for cache storage, the vault, and identity. If your machines sit behind a firewall or proxy, allow these addresses, or use service tags in network security groups. In locked-down environments, private endpoints for the vault and storage can keep replication traffic off the public internet. Microsoft publishes the lists of required addresses and the supported private options, which change occasionally.

!
Watch out

Test failovers use an isolated network by default, so they will not reveal routing problems to production dependencies. Include an additional test in which the recovered test machines reach everything they will need in a real event, such as databases and identity servers, using a prepared test network connected to copies of those systems.

9Recovery Plans: Orchestrating the Recovery

A real application is not one server. It is a family of servers that must start in a sensible order. Recovery plans capture that order.

What a recovery plan is

A recovery plan groups machines and describes the steps for failing them over together. It is a document the service can run. Machines are placed into groups, which start one after another. Within a group, machines start in parallel. Between groups, you can add pre-actions and post-actions, which are manual steps for a human to confirm or automation scripts that run at defined points.

flowchart TD
  START["Start recovery plan"] --> G1["Group 1 Identity and DNS servers"]
  G1 --> A1["Post action check domain controller health"]
  A1 --> G2["Group 2 Database servers"]
  G2 --> A2["Post action attach database storage and verify"]
  A2 --> G3["Group 3 Application servers"]
  G3 --> A3["Post action run script to update settings"]
  A3 --> G4["Group 4 Web servers"]
  G4 --> A4["Post action add to load balancer and update traffic routing"]
  A4 --> DONE["Plan complete and verify application"]
Figure 9.1: A recovery plan for a three-tier application
Analogy

A recovery plan is the opening checklist for a restaurant: first turn on the power and gas, then light the ovens, then start the kitchen, and only then open the doors to customers. Opening the doors before the kitchen is ready makes a mess, and so does starting a web server before its database.

Why order matters

  • Identity and name services first. Domain controllers and DNS must be up before servers that need to authenticate or look up names.
  • Databases before applications. Applications that start without their database may crash or cache an error state.
  • Applications before web front ends. The front end should not accept customers until the back end is ready.
  • Traffic last. Direct users to the recovered site only after checks pass.

Automation inside plans

Automation

Azure Automation runbooks

Scripts that run in the cloud at a point in the plan, for example to create public IP addresses, attach machines to load balancers, or update DNS.

Automation

Scripts and Functions

Other automation services can be called through runbooks or webhooks to perform steps the plan cannot.

Human

Manual actions

Pauses where a person must confirm something, such as checking a financial report or approving the traffic switch.

Context

Plan context data

When a runbook runs inside a plan, it receives information about the machines and the plan, helping scripts work out what to do.

Good recovery plan habits

  • Create one plan per application or per tier of related applications, not one giant plan for everything.
  • Keep scripts simple, tested, and idempotent, meaning running them twice causes no harm.
  • Store scripts in source control, and keep a copy of the plan description outside the primary region, because documentation held only in the failed region is useless.
  • Include a verification step at the end: a health check or smoke test that proves the application works.
  • Design plans so they can run both ways: failover to the secondary and failback to the primary after reprotection.
  • Version plans, and review them whenever the application changes.

Scale of plans

Plans have documented limits on the number of machines and groups. For very large estates, split protection into several plans, run in a planned sequence with a coordinating runbook or human leader. Check the current limits.

i
Tip

Write each recovery plan so that someone who has never seen the application could run it, under stress, at 3 a.m. Names, step order, and decision points should be obvious. Many real recoveries fail not from technology, but because the one person who understood the plan was on holiday.

10Test Failover, Failover, Reprotect, and Failback

These four activities form the life cycle of a real recovery. Learn them in the order you will use them.

flowchart LR
  A["Normal operation in primary region"] --> B["Replication to secondary"]
  B --> C["Test failover in isolated network"]
  C --> D["Cleanup test resources"]
  D --> B
  B --> E["Disaster in primary"]
  E --> F["Failover to secondary"]
  F --> G["Commit the failover"]
  G --> H["Run on secondary"]
  H --> I["Primary repaired"]
  I --> J["Reprotect to reverse replication"]
  J --> K["Failback to primary"]
  K --> L["Reprotect again to original direction"]
  L --> A
Figure 10.1: The disaster recovery life cycle from rehearsal to failback

Test failover: the fire drill

A test failover creates copies of your machines from a recovery point in a separate, isolated virtual network. Production keeps running, and replication continues undisturbed. You log in to the test machines, check that applications start and data looks right, and then clean up, which deletes the test machines. Test failover is the single most valuable feature of the service, since a plan that has never been tested is only a hope.

  • Run tests regularly, at least every few months, and after any major change in the application or network.
  • Test with realistic scenarios, including starting the whole application from the recovery plan and verifying functionality from a user’s point of view.
  • Time the test, and compare the result with your RTO.
  • Record findings, fix what failed, and repeat.
  • Remember that test machines cost money while they exist. Clean up promptly.

Failover: the real thing

In a real disaster, you run a failover on a machine or a recovery plan. The steps are as follows.

1

Decide

Someone with authority declares a disaster. This is a business decision as much as a technical one, because failing over has consequences.

2

Choose a recovery point

Options usually include the latest processed point (fastest), the latest point (which includes unprocessed data and takes slightly longer), the latest application-consistent point, the latest multi-VM consistent point, or a custom point in time. Pick the latest unless you suspect corruption, in which case choose an earlier point.

3

Start the failover

The service creates virtual machines from the replica disks in the target region, attaches them to the mapped network, and starts them in the order of the recovery plan.

4

Verify

Check each machine and the application: logs, services, database state, and connectivity.

5

Commit

Committing finalises the failover and removes other recovery points. After committing, you cannot choose a different point, so verify first.

6

Redirect users

Update DNS or global routing so that users reach the recovered servers.

Planned versus unplanned failover

An unplanned failover responds to a real or simulated disaster, accepting that some recent data may be lost because the source might not be able to send its last changes. A planned failover, available for some scenarios such as on-premises VMware and Hyper-V sources, first shuts down the source machines and sends the final changes, so no data is lost. Planned failovers suit expected events, like moving out of a building, or a drill that uses a real switch. Check which options exist for your scenario.

Analogy

An unplanned failover is leaving the burning building through the nearest exit: you take what you can carry. A planned failover is a controlled move to a new office: you switch the old machines off at the end of the day, carry every box over, and open the new office the next morning with nothing missing.

Reprotect and failback

After failover, the recovered site is running without any safety net: its own copy no longer exists. Once the original site is repaired, you perform reprotect, which reverses replication so that changes made in the recovery site flow back to the original. After the original is up to date, you fail back, switching the live workload back. For Azure-to-Azure, the process re-creates virtual machines in the original region. For on-premises sources, failback copies data back to the on-premises environment, which may require additional components and bandwidth.

  • After failback, reprotect again to resume the original direction of protection.
  • Allow time for resynchronisation, which can be lengthy for large disks.
  • Run failback during a quiet period, and plan another user redirection and verification.

Common failover decisions

QuestionConsiderations
Is it truly a disaster?Failing over for a short outage may cost more disruption than waiting. Define criteria and a decision maker ahead of time
Which recovery point?Latest for outages; earlier for corruption or ransomware, after confirming the point is clean
Single machine or whole plan?Plans handle dependencies. Single machine failovers suit isolated servers
How long will we run in the secondary?Short stays may skip failback complexity; long stays need capacity, backup, and monitoring in the new site
How will we communicate?Prepare messages for staff and customers, and a place outside the affected systems to publish updates
!
Watch out

If the disaster is ransomware, replication may have faithfully copied the encrypted disks. Choose a recovery point from before the infection, and combine Site Recovery with immutable backups. Do not assume the latest point is clean.

11Designing Disaster Recovery: Tiers, Targets, and Strategy

Technology is the easy part. The harder, more valuable part is deciding what to protect, to what level, and at what cost.

Start with the business

The right question is not “can we replicate everything?” but “what happens to the business if each system is down for an hour, a day, a week?” A business impact analysis assigns each application a cost of downtime, measured in lost sales, legal penalties, and damaged trust. That cost guides how much to invest in protection. A printing queue server and a payment gateway do not deserve the same recovery target.

Tiering applications

TierExampleTypical RTOTypical RPOTypical approach
Tier 0Identity, DNS, core network servicesMinutesNear zeroRecovered first; sometimes always-on in both regions
Tier 1Revenue-critical systems such as payments and orderingUnder an hour or twoMinutesSite Recovery plus platform replication for data; frequent drills
Tier 2Important internal systemsSeveral hoursAn hour or lessSite Recovery with simpler plans
Tier 3Departmental tools, reportingA day or moreHoursBackup and rebuild, or low-cost replication
Tier 4Development, test, sandboxDaysNot neededInfrastructure as code to rebuild

These figures are examples to show the idea. Your own numbers come from the business.

Strategies from cheap to expensive

Cold

Backup and restore

Cheapest. Recovery takes the longest because everything must be rebuilt and restored. Suits tiers with long tolerance.

Warm standby

Replicate and start on demand

Site Recovery’s classic mode. Disks are replicated, compute is created only on failover. Moderate cost, recovery in minutes to hours.

Hot standby

Reduced copy always running

A smaller version of the application runs in the second region and scales up on failover. Faster, but you pay for the running machines.

Active-active

Both regions serve users

Highest cost and complexity, with near-zero downtime. Requires an application designed for multiple regions, often using global databases.

Analogy

Think of insurance for a shop. A cold plan is a savings jar: you rebuild after the fire. A warm plan is a rented warehouse with shelves ready, waiting for stock. A hot plan is a second small shop already open with some staff. An active-active plan is two full shops both selling every day. Each step costs more and recovers faster.

Choosing the target region and mode

  • Distance. Far enough to avoid the same disaster, close enough to keep replication latency and legal boundaries acceptable.
  • Data residency. Laws may require data to stay in a country or a regional group.
  • Service availability. The target must offer the same virtual machine sizes, storage types, and features.
  • Quota and capacity. Request enough cores in advance. For the most critical systems, consider capacity reservations in the target region to guarantee that machines can start.
  • Zone-to-zone option. When the main risk is the loss of a data center building and not a region, zone-to-zone disaster recovery protects within one region with lower latency and no cross-region data transfer, while keeping the same orchestration.

Document the whole application

For each application, write a one-page recovery sheet. It should name the owner, the tier, the RPO and RTO, every component and how it is protected, the order of recovery, dependencies, contact details, the location of the runbook outside the primary region, and the date of the last successful test. This sheet is the thing people reach for under stress.

i
Tip

Assume that the people who built the system may not be available during a disaster. Make the plan understandable to a competent engineer who has never seen it, and keep an offline copy, such as a printed page or a copy in another cloud, in case your documentation system is itself unreachable.

12Data and Application Consistency

Copying disks is easy. Making sure the copy actually works as an application is the real challenge, especially for databases and for systems made of several servers.

Why consistency matters

A database writes to several files at once: data files, log files, and index files. If a copy captures the data file at one moment and the log at another, the pieces may not agree, and the database refuses to start or, worse, starts with silent damage. Consistency means that the copy represents one coherent moment. Site Recovery gives you tools for this, but you must choose and test them.

Analogy

Imagine photographing a busy restaurant ledger and the cash register at slightly different moments. The ledger shows a sale that the till has not yet recorded. When the accountants compare them later, the numbers do not match. A consistent copy photographs both at the same instant, or asks everyone to pause while the pictures are taken.

Single-machine consistency

For one machine, crash-consistent points are usually enough for modern file systems and well-built databases, which can replay their logs after an abrupt stop, just as they do after a power cut. For systems where you want a clean state, such as older databases or applications that cache heavily, application-consistent points are safer. On Windows, they rely on the Volume Shadow Copy Service and application writers such as SQL Server’s. On Linux, they use pre- and post-snapshot scripts that you provide to quiet the application.

Multi-machine consistency

Some systems spread state across several machines: a clustered database, an application server plus a message broker, or a sharded data store. If each machine is recovered to a slightly different moment, the system as a whole can be inconsistent. A replication group with multi-VM consistency makes the machines share common recovery points. The cost is extra overhead and the requirement that machines communicate with each other regularly during snapshot creation. Use it only when needed, and keep the group small. Check the documented limits on group size.

Databases need their own plan

Database setupRecommended approachReason
SQL Server on a virtual machine, non-criticalSite Recovery with application-consistent pointsSimple, covers the whole machine
SQL Server with strict RPODatabase-level replication such as availability groups or log shipping to the secondary, with Site Recovery for the other machinesDatabase-aware replication can reach very low data loss and keeps databases consistent
Other database engines on VMsUse the engine’s own replication for the data, Site Recovery for the host if usefulNative tools understand transactions
Azure SQL Database or Managed InstanceActive geo-replication or failover groupsPlatform services are not virtual machines, so Site Recovery does not apply
Cosmos DB, StorageMulti-region and redundancy settingsBuilt-in replication features

Identity and directory servers

Domain controllers need special care. Restoring an old copy of a domain controller can cause replication conflicts across the directory. Microsoft recommends that for Active Directory you use a design in which additional domain controllers already exist in the recovery location, kept up to date by normal directory replication, rather than relying on replicating domain controller disks. If you do use Site Recovery for them, follow the specific guidance for the supported version. Cloud identity from Microsoft Entra ID is global and does not need regional failover.

Other special cases

  • Clusters with shared disks. Some shared disk clusters have limited or special support. Check the matrix, and prefer application-level clustering or replication across sites.
  • Licence-bound software. Software tied to hardware identifiers or addresses may stop working after recovery. Talk to vendors about disaster recovery licensing.
  • Time-sensitive systems. Systems that depend on clocks, such as certificates or tokens, may need checks after a long gap.
  • Scheduled jobs. Decide whether batch jobs resume automatically after failover, or whether someone reviews first, to avoid duplicates.
  • Outbound integrations. Partners may allow only certain source addresses. Update them or use fixed outbound addresses planned for both regions.
i
Tip

After each test failover, do not stop at “the machine boots.” Run a business check: log in as a user, place an order, run a report, and compare totals with production. A boot is not a recovery.

13Security for Disaster Recovery

A recovery site holds a full copy of your most valuable systems and the power to take over production. It must be guarded as carefully as the original.

Who may do what

RoleAllows
Site Recovery ReaderView health, status, and settings, but not change them
Site Recovery OperatorRun failover, failback, and test failover, and enable or disable replication for existing items, but not create or delete vaults or manage policies
Site Recovery ContributorAll Site Recovery management except giving access to others and deleting the vault
OwnerFull control, including access management

Assigning a custom mix is possible. Enabling replication for Azure virtual machines also needs rights on the machines, the target resource group, and the network, so teams often combine Site Recovery roles with Virtual Machine Contributor on specific scopes. Keep the ability to run production failover with a small, trained group, and give wider read access so that operations and auditors can see status.

Protecting the vault and the recovery site

Access

Least privilege and PIM

Grant time-limited elevated rights through Privileged Identity Management, and require multifactor authentication for anyone who can fail over.

Change control

Alert on changes

The Activity Log records disabling replication, changing policies, and failover actions. Alert on unexpected ones.

Locks

Resource locks

Use delete locks on vaults and key target resources, so an accidental or malicious deletion needs a deliberate extra step.

Network

Private connectivity

Use private endpoints and firewall rules for the vault and cache storage where supported, keeping replication traffic off the public internet.

Identity

Managed identities

Newer options let the vault use a managed identity to reach cache storage, which reduces reliance on shared keys. Check current support.

Separation

Separate subscriptions

Hold the recovery resources in a subscription with different administrators when feasible, so a compromise of the primary does not automatically expose the recovery site.

Encryption

  • In transit. Replication traffic is encrypted. Between on-premises sources and Azure, data is sent over secure channels.
  • At rest. Replica disks in Azure are encrypted with platform-managed keys by default. You can use customer-managed keys through disk encryption sets where your policy demands it, and the target must have matching key vault and keys.
  • Azure Disk Encryption. Machines that use it need extra steps: key vaults, key permissions, and target-region key access must be set up so that recovered machines can unlock their disks.
  • Keys in the target region. If keys exist only in the failed region, you cannot start encrypted machines. Plan key replication or a key vault in the recovery region.
Analogy

A spare office with a complete set of files is only useful if you also have the keys to its cabinets. Storing all the cabinet keys in the burning building makes the spare office a locked room of useless paper.

Ransomware and malicious deletion

An attacker with administrator rights may try to disable replication, delete replica disks, or destroy the vault so that you cannot recover. Defences include strong identity protection, alerts and locks, separate administration for the recovery site, and independent immutable backups held in a different security boundary. Remember that replication reproduces bad data quickly, so Site Recovery alone is not a ransomware defence; it must be combined with backup and clean recovery points.

Compliance and audit

Auditors often ask for evidence of regular disaster recovery tests. Keep records: test dates, scope, results, issues, fixes, and sign-offs. The service shows job history and test failover results, which you can export. Make sure the recovery region meets the same compliance requirements as the primary, including residency, certifications, and logging.

!
Watch out

Do not let the recovery site become a weaker copy of the primary. A recovered environment often skips monitoring, patching, antivirus, and logging because “it is only for emergencies.” During a real event, it is the production system, and attackers know this.

14Performance, Capacity, and Cost

Disaster recovery is insurance. A good design buys the protection you need at a price you can accept, and avoids waste.

What you pay for

Cost elementWhen it appliesNotes
Site Recovery licencePer protected instance per monthPricing differs by scenario, such as Azure-to-Azure versus on-premises to Azure. A free period for new instances may apply. Check current pricing
Replica disk storageContinuouslyManaged disks in the target region for each protected disk. Often the largest steady cost
Cache storage accountContinuously, smallStandard storage in the source region for temporary change data
Recovery point storageContinuouslyGrows with retention length and data churn
Network transferWhile replicatingData leaving the source region is billed as outbound transfer between regions
Compute in the targetOnly during test failover or real failoverThe big saving compared with a duplicate environment
Supporting resourcesWhen createdLoad balancers, gateways, firewalls, and reserved capacity in the target region
On-premises componentsContinuouslyAppliance hardware or virtual machines, and the bandwidth needed

A worked example

These figures are invented, to show the arithmetic only. Suppose a company protects 50 machines, each with 200 gigabytes of disks, so 10,000 gigabytes in total. Replica storage must hold roughly that much in the target region. Add a licence fee per machine per month, multiplied by 50. Add the small cache accounts, transfer of changed data, and recovery point overhead. Compare this with running 50 duplicate machines around the clock, which would add the full compute cost of 50 machines for the whole month. The difference, usually large, is the economic reason that replicate-and-start-on-demand is the default design. In a test failover lasting four hours, you pay only for four hours of compute for the machines you start.

Saving money wisely

1

Protect by tier

Do not replicate development and test machines that can be rebuilt from code.

2

Exclude disposable disks

Temporary or scratch disks add churn and storage cost with no value.

3

Choose disk types for the replica

The replica disks can use cheaper storage tiers than the source, accepting slower performance during an emergency. Weigh the risk against the saving.

4

Right-size the target machines

If your recovered environment can run smaller during the emergency, define smaller sizes, but test that it actually copes.

5

Keep retention modest

Longer retention costs more storage. Use backup for long history.

6

Clean up test failovers

Forgotten test machines run up compute bills. Automate cleanup.

7

Retire protection for decommissioned machines

Disable replication when machines are deleted, and delete orphaned replica resources.

8

Use reservations and capacity reservations carefully

Capacity reservations guarantee that cores are available in the target region but are billed whether used or not. Reserve only for critical tiers.

Capacity and performance on the day

Failover performance has two parts. First, the time to create and start machines, which usually takes minutes per group, although large plans take longer. Second, the performance of the recovered machines. Disks restored from replica storage may be slower at first, especially if the replica used a lower tier. Network paths from users and dependencies may be longer. Recovered machines in a distant region may see higher delay to remaining systems left in the original region, such as an on-premises database. Test application performance during drills, not just whether it starts.

Analogy

A spare tyre is stored flat in the boot at low cost. You do not run four extra tyres around the car all year just in case. But the spare has to be inflated and the jack must be in the car, or the insurance is worthless. Likewise, replication is the cheap storage of the spare, and capacity, quota, and rehearsals keep it usable.

i
Tip

Measure data churn per disk before you enable protection, and again afterwards. Disks with very high churn may exceed what replication can handle, or may need premium storage and higher network capacity, which changes both the cost and the achievable RPO.

15On-Premises Scenarios: VMware, Hyper-V, and Physical Servers

Many organisations still run servers in their own data centers and use Azure as the recovery site. The ideas are the same, with extra pieces on the local side.

Why Azure as a recovery site

Building a second physical data center is slow and expensive. Using Azure as the recovery site converts that capital cost into a modest monthly charge, with compute paid only when needed. It also gives geographic separation without a new building, and it can later become a stepping stone for moving workloads permanently to the cloud.

VMware and physical servers

Local

Replication appliance

A virtual machine or server you deploy on-premises that discovers machines, receives changes from the Mobility service, compresses them, and sends them to Azure.

Local

Mobility service

Installed on each protected machine, captures disk changes. For VMware it can be pushed by the appliance with proper credentials.

Azure

Vault and storage

The vault receives status and orchestrates recovery. Replicated data is stored in Azure storage and turned into disks on failover.

Link

Network path

Replication travels over the internet (encrypted) or over private connections such as ExpressRoute. Bandwidth sizing is critical.

Hyper-V

For Hyper-V, you install the Site Recovery provider and the Microsoft Azure Recovery Services agent on each host, register them with the vault, and enable protection on virtual machines. Replication is host-based, so you do not install an agent inside each guest machine. Some environments use System Center Virtual Machine Manager to manage clouds of hosts, and the provider integrates there.

Sizing the connection

The most common failure of on-premises setups is a link that is too small. To size it, estimate the daily change rate of all protected disks, convert to a sustained speed, and add a margin. Also consider the one-time cost of initial replication: terabytes over a modest link take days. Techniques include starting during quiet periods, throttling during business hours, and, where offered, shipping disks. If the link cannot keep up, the RPO grows steadily, and you may be unprotected without noticing.

QuestionWhy it matters
How much data changes per day per disk?Determines the sustained bandwidth needed and storage growth
How big is the initial copy?Determines how long the first replication takes
Is the link shared with business traffic?Replication may starve users or be starved itself
Is ExpressRoute available?Provides predictable, private connectivity
Where will users connect during an outage?Users may be in the same disaster zone; plan remote access to the recovered network
How will we fail back?Failback means moving the changed data back, which also needs bandwidth and time

Failing back to on-premises

After an on-premises failover, the site is repaired, and you want to return. The process reprotects the Azure machines, synchronises changes back to the on-premises environment, and then switches. It needs on-premises capacity ready, networking restored, and enough bandwidth to bring back the changes made while running in Azure. For long stays in Azure, plan for this carefully, and sometimes decide to remain in Azure and treat the failover as a permanent move.

Analogy

Using Azure as the spare site is like renting a furnished apartment instead of building a second house. It is cheap to hold, and you move in when needed. But the road between the two homes must be wide enough to carry your daily deliveries, and you need a plan for getting your furniture back when the house is repaired.

!
Watch out

On-premises components are software that needs patching, monitoring, and certificates. An outdated or unhealthy replication appliance silently stops replication. Treat it like any other production system, with alerts and updates.

16Monitoring, Logging, and Troubleshooting

A disaster recovery system that is broken without anyone noticing is worse than none at all, because it gives false comfort. Monitoring is how you keep the promise.

What to watch

Health

Replication health

Each machine shows Healthy, Warning, or Critical, with reasons. Anything other than healthy needs action.

Data

Current RPO

The age of the latest recovery point, per machine, with charts over time. Compare against your target.

Points

Latest recovery points

Check that crash-consistent and application-consistent points are being created on schedule.

Drills

Test failover status

Last test date and outcome for each plan. Overdue tests are a finding.

Jobs

Site Recovery jobs

A history of operations, with detailed errors for failed ones.

Infra

Appliance and agents

Health and version of replication appliances, Mobility agents, and providers.

Alerts and reports

  • Enable email notifications and Azure Monitor alerts for replication health, RPO breaches, failed jobs, and failover events.
  • Send vault diagnostics to a log workspace, and build a dashboard showing coverage, health, and the age of the latest test.
  • Report weekly on unprotected machines in scope, using inventory queries.
  • Track quota usage in the target region against the cores required for a full failover.
  • Archive test reports as audit evidence.

Common problems and their usual causes

What you seeUsual causeWhat to do
Enable replication failsMissing permissions, unsupported configuration, policy blocking resource creation, or quotaRead the job error, check roles, supported OS and disks, and Azure Policy denies in target resources
Mobility service installation failsAgent cannot be installed: no extension handler, blocked network, or incompatible operating systemCheck the VM agent status, outbound connectivity, and the support matrix
Replication health Warning with rising RPOHigh churn, network limits, or throttlingInspect churn charts, consider excluding disks, increasing bandwidth, or using premium storage
Replication Critical, no recent pointsAgent stopped, cache storage inaccessible, or service connectivity brokenCheck agent services, firewall rules, storage firewalls, and keys
App-consistent points are failingSnapshot facility problems, such as VSS errors or a Linux script failingCheck the guest logs and the snapshot writers; fix or reduce frequency
Failover fails: not enough coresQuota in the target region is too lowRequest quota increases ahead of time; change sizes in the target settings
Failover fails: size or zone unavailableRequested VM size or zone not offered in targetSelect an available size or reservations; keep a list of alternatives
Recovered VM starts but is unreachableWrong subnet, missing NSG rules, no public IP or load balancer attachment, or DNSCheck the network mapping, effective security rules, and routes
Recovered VM won’t boot or has disk errorsCrash-consistent point captured a problematic state, or incompatible driversTry an earlier or app-consistent point; check boot diagnostics
Encrypted VM fails to startKeys unavailable in the targetPrepare key vault and disk encryption sets in target; verify permissions
Test failover cleanup stuckResource locks or dependencies on test resourcesRemove locks, delete dependent items, retry
Reprotect fails or is very slowLarge resync, missing target resources, or old resources still presentAllow time, check errors, and ensure the original site has needed resources

A calm method for investigating

1

Open the machine’s replicated item

Read the health errors and the error code, and the time they began.

2

Sort the problem

Is it the machine and its agent, the network path, the storage, the permissions, or the service?

3

Compare with a healthy machine

What differs: disk, size, network, OS, firewall, or recent changes?

4

Fix and watch recovery

Apply one fix. Replication usually self-heals and catches up. Watch the RPO chart until it falls.

5

Record and prevent

Add the cause and cure to your runbook, and add a monitor or a policy to catch it earlier next time.

i
Tip

Treat a drill failure as a success of the process: the drill found the problem on a calm day. Make the findings visible, assign owners, and re-test, so that confidence grows from evidence.

17Choosing the Right Tool for Resilience

Site Recovery is one tool in a larger toolbox. Matching each tool to the problem gives a better and cheaper design.

flowchart TD
  Q["What are you protecting against"] --> A{"Accidental deletion or corruption of data"}
  A -->|"Yes"| BK["Azure Backup with immutable vaults"]
  A -->|"No"| B{"Failure of a rack or host"}
  B -->|"Yes"| AS["Availability sets and zones"]
  B -->|"No"| C{"Loss of a data center building"}
  C -->|"Yes"| ZN["Zone redundant design or zone to zone Site Recovery"]
  C -->|"No"| D{"Loss of a whole region"}
  D -->|"Virtual machines"| SR["Azure Site Recovery"]
  D -->|"Platform databases"| GEO["Geo replication and failover groups"]
  D -->|"Stored files"| GRS["Geo redundant storage"]
  D -->|"Near zero downtime needed"| AA["Active active multi region design"]
Figure 17.1: Matching each kind of failure to a resilience feature

The options compared

OptionStrengthWeaknessBest for
Azure Site RecoveryGeneric, works for most virtual machines without changing the application; orchestration and drillsMinutes to hours of recovery; machine-level onlyLift-and-shift workloads and tiers 1 to 3 without native replication
Application-native replicationLowest data loss, application-awareNeeds application support and expertiseDatabases and message systems with strict RPO
Active-active multi-regionNear-zero downtime and continuous testing in productionMost complex and costly; needs a cloud-native designMission-critical global services
Backup and restoreCheap, handles deletion and ransomwareSlowest recoveryLow tiers and long-term history
Infrastructure as code rebuildRepeatable, cheap, great for stateless tiersData must come from elsewhereStateless web tiers and dev environments
Third-party toolsDifferent features, possibly lower RPO or multi-cloud supportExtra licensing, skills, and integrationEstates that span clouds, or special requirements
!
Watch out

Product features and recommended tools shift over time, including how Microsoft positions Site Recovery, Azure Migrate, and the backup services. Check current announcements and the documentation for your scenario before you commit to a long-term design.

Combining tools

The best designs combine tools. A typical three-tier application might use infrastructure as code to rebuild stateless web servers, Site Recovery for the middle-tier application servers that are hard to recreate, a database’s own replication for data, geo-redundant storage for files, backup for history and ransomware recovery, and a global traffic manager to send users to the healthy region. Each does what it is best at.

Questions to settle the design

  • What is the RPO and RTO for each application, and who has approved them?
  • Which components can be rebuilt, which can be replicated, and which need native replication?
  • What do we do about shared services, identity, DNS, certificates, and networks?
  • Who is authorised to declare a disaster and run the plan?
  • How often do we drill, and what do we do with the findings?
  • How would we know if replication stopped working yesterday?

18Patterns and Anti-Patterns

Teams that recover well repeat a few good designs. Teams that struggle repeat a few familiar mistakes. Knowing both saves painful lessons.

Patterns that work

Pattern

Tiered protection

Different applications get different targets and methods, based on business impact, so money goes where it matters.

Pattern

Shared services first

Identity, DNS, networking, and key management are recovered or kept alive in the secondary before applications that depend on them.

Pattern

Infrastructure as code for the recovery region

Networks, gateways, load balancers, and policies in the target region are built from templates and kept in step with the primary.

Pattern

Recovery plans per application

Each application has its own ordered plan, tested and versioned, with runbooks and manual checks.

Pattern

Regular, timed drills

Quarterly test failovers with measured RTO, business checks, and recorded findings.

Pattern

Native replication for data tiers

Databases replicate with their own tools, while Site Recovery handles the machines around them.

Pattern

Global routing for traffic

A global traffic manager shifts users automatically or with a single controlled change.

Pattern

Backups for history, ASR for continuity

Both exist, with separate security boundaries, so ransomware cannot destroy every copy.

Habits compared

Healthy habits

  • Written RPO and RTO per application
  • Coverage reports for unprotected machines
  • Quota and capacity checked in the target
  • Drills followed by fixes and re-tests
  • Offline copies of the runbooks

Habits that hurt

  • Enabling replication and never testing
  • Assuming the vault is a complete solution
  • No network or DNS plan for the target
  • Runbooks stored only in the primary region
  • One giant plan nobody understands

Four decisions worth recording

Teams that write down their key decisions avoid arguing about them again a year later. These short records use the common format of context, decision, and consequences. They are illustrative examples, not mandates.

ADR-1Example: Accepted

Use warm standby with Site Recovery for tiers 1 to 3, and rebuild tier 4. Context: finance asked why development machines were being replicated, and why the bill was high. Decision: only production workloads are replicated, and development environments are rebuilt from code. Consequences: lower cost and simpler plans; development teams must keep their environment code current.

ADR-2Example: Accepted

Use global traffic routing instead of DNS edits for public applications. Context: a past drill took an extra hour because DNS caches kept sending users to the failed site. Decision: public entry goes through a global routing service with health probes, and the failover plan updates its settings. Consequences: faster, more predictable redirection; an additional service to run and secure.

ADR-3Example: Accepted

Keep the recovery region in a separate subscription with separate administrators. Context: a credential theft in the primary subscription could have let an attacker delete replicas. Decision: recovery resources live in their own subscription with distinct access and alerts. Consequences: stronger protection against compromise; more complicated permission management and cross-subscription networking.

ADR-4Example: Proposed

Reserve capacity in the target region for tier 1 systems only. Context: in a regional event, many customers may compete for capacity, and a failover could fail for lack of cores. Decision: tier 1 machines have capacity reservations in the target, while lower tiers rely on quota and best-effort capacity. Consequences: higher assurance for critical systems at a recurring cost; lower tiers may wait if capacity is tight.

19Best Practices and Common Mistakes

This chapter gathers the advice of the whole book into one checklist to use before launch, during reviews, and after incidents.

Best practices

1

Begin with business targets

Agree on an RPO, RTO, owner, and tier for each application, and write them down.

2

Inventory and automate protection

Use tags, policy, and templates so that every in-scope machine is protected automatically and exceptions are visible.

3

Prepare the target environment as code

Networks, security rules, load balancers, key vaults, and monitoring exist before the disaster, and are kept in sync.

4

Choose consistency deliberately

Use application-consistent points for databases, multi-VM groups only when truly needed, and native database replication for strict targets.

5

Build recovery plans with verification

Order, pauses, scripts, and final health checks, versioned with the application.

6

Drill regularly and measure

Run test failovers, time them against the RTO, validate business functions, fix the issues, and re-test.

7

Secure the recovery path

Least privilege, PIM, locks, alerts, private connectivity, and keys available in the target.

8

Monitor health and RPO continuously

Alert on warnings, track quota, and report weekly on coverage and test age.

9

Keep backup alongside

Backups protect against deletion and ransomware, while Site Recovery protects against loss of a site.

10

Train people and keep documents reachable

Practise roles, keep offline copies of runbooks, and plan communications.

Common mistakes

MistakeConsequenceBetter approach
Never running a test failoverThe first real test is the disaster itselfSchedule drills, report their results to management
Forgetting the network, DNS, and load balancersMachines recover but nobody can reach themInclude network and traffic steps in the plan and the drill
Insufficient quota in the target regionFailover stops partwayRaise quota in advance; consider capacity reservations for critical tiers
Protecting only some machines of an applicationThe application cannot run in the secondaryProtect every dependent component or have a documented alternative
Ignoring database consistencyRecovered databases corrupt or lose transactionsUse app-consistent points or native replication
Putting the vault in the failed regionCannot orchestrate recoveryPlace the vault in the target region
Letting replication warnings lingerThe true RPO is hours or days, not minutesAlert and act on warnings promptly
Keys or secrets only in the primaryEncrypted machines or applications cannot startReplicate keys and secrets to the target
Forgetting the cost of test machinesUnexpected billsClean up tests automatically
Assuming latest recovery point is always rightRansomware or corruption restored faithfullyChoose an earlier clean point and use immutable backups
Single person knowledgePlan fails when that person is awayDocument, train, and rotate drill leaders
No failback planStuck in a recovery site that was not meant for the long termPlan reprotect and failback, or decide to stay permanently
A disaster recovery plan that has not been tested is a hope, not a plan. A plan that has been tested last year is a memory. A plan tested this quarter is a capability.

20Real-World Scenarios

The following scenarios are invented illustrations built from common situations. They are not case studies of real companies, and the numbers are examples chosen to make the ideas concrete.

Scenario 1: A software-as-a-service company protects its Azure estate

Situation. An imagined company runs its customer-facing application on about 80 Azure virtual machines in one region. Contracts promise recovery within four hours after a regional outage.

Design. Production machines are replicated to the paired region. The SQL tier uses availability groups with an asynchronous replica in the second region, while application and web tiers use Site Recovery. Networks, load balancers, and key vaults in the secondary region are deployed from templates. A global routing service steers users. Recovery plans start shared services, then data, then application servers, then web servers. The team drills every quarter and records the time.

Outcome. Drills show a recovery in about 75 minutes. A drill once uncovered a missing firewall rule, which was fixed before any real event. Customers’ auditors receive the drill reports each year.

Scenario 2: A manufacturer uses Azure as the recovery site for its data center

Situation. An imagined manufacturer runs 120 VMware virtual machines and a few physical servers in its own data center. Building a second data center was estimated to be too expensive.

Design. A replication appliance sends changes to Azure over a dedicated private link. The most important factory systems have recovery plans with manual actions for the plant managers. Less important systems are replicated with longer retention and no automation. Office staff connect to the recovered network over a site-to-site VPN created in advance. An annual full drill is planned during a scheduled production shutdown.

Outcome. The company avoids building a second site, pays modest monthly costs, and learns in its first drill that the VPN device settings were wrong. After the fix, the second drill succeeds.

Scenario 3: A retailer prepares for a peak season

Situation. An imagined online retailer has its busiest days at year end. An outage then would cost many times its normal daily revenue.

Design. In the months before the peak, the team raises quota in the secondary region, reserves capacity for tier 1 machines, shortens DNS TTLs, runs a full drill under simulated load, and writes a clear decision rule for when to fail over. During the peak, they add extra alerts on replication health and keep an incident bridge ready.

Outcome. No major outage occurs, but a brief regional network problem tests the decision rule, and the team decides correctly not to fail over because the primary recovered within minutes.

Scenario 4: A small firm keeps things simple

Situation. An imagined accounting firm has six virtual machines in Azure and no dedicated operations team.

Design. They protect all six machines with Site Recovery to the paired region using one policy, with a single recovery plan. Backups provide history. They run a test failover twice a year, with a short checklist printed on paper and a runbook stored in a different cloud service.

Outcome. The monthly cost is small. Their auditor accepts the test records as evidence, and the owner sleeps better.

21Frequently Asked Questions

Short answers to the questions beginners ask most often.

Q1 What is Azure Site Recovery in one sentence?
It is an Azure service that continuously copies your servers’ disks to another region or to Azure, so that you can start those copies as live servers if the original site fails.
Q2 What is the difference between RPO and RTO?
RPO is the amount of recent data you can afford to lose, measured as time. RTO is how long you can be down before service returns.
Q3 Is Site Recovery the same as backup?
No. Backup keeps historical copies for restoring data after deletion or corruption. Site Recovery keeps a nearly current copy of whole servers for quick switching after a site or region loss. Most organisations need both.
Q4 Do I pay for the virtual machines in the secondary region?
Not while you are only replicating. You pay for the protected instance fee, the replica storage, and related items. Compute is billed only when you run a test failover or a real failover.
Q5 What is a recovery point?
A saved moment in time you can recover to. Crash-consistent points are taken frequently, and application-consistent points are taken on a schedule and give cleaner application states.
Q6 How much data might I lose?
Typically seconds to a few minutes for Azure-to-Azure, depending on data churn and network health. The portal shows the current RPO per machine, and you should alert on it.
Q7 What is a test failover and is it safe?
It starts copies of your machines in an isolated network without affecting production or replication. It is the safe way to prove the plan works. You clean up the test machines afterwards.
Q8 What is a recovery plan?
A saved set of steps that fails over several machines in a defined order, with optional manual actions and automation scripts. It makes recovery repeatable.
Q9 Where should the Recovery Services vault be?
For Azure-to-Azure, in the target region, so it remains available if the source region fails. For on-premises sources, in the Azure region where you want to recover.
Q10 Does Site Recovery protect Azure SQL Database or storage accounts?
No. It protects virtual machines and physical servers. Platform services have their own replication options, such as geo-replication, failover groups, and geo-redundant storage.
Q11 What happens to the network during failover?
Machines start in the target network that you mapped. Addresses, security rules, load balancers, and DNS must be prepared ahead of time, because they are not copied automatically.
Q12 What is reprotect and failback?
After a failover, reprotect reverses replication so the recovery site is protected and changes flow back. Failback switches the live workload back to the original site when it is healthy.
Q13 How often should I test?
At least a few times a year for important systems, and after major changes to applications or networks. Many regulations and auditors expect regular, documented tests.
Q14 Can Site Recovery protect against ransomware?
Not by itself. Replication copies encrypted data too. Use earlier recovery points when appropriate, protect access, and keep immutable backups in a separate security boundary.
Q15 Why did my failover fail for lack of capacity or cores?
The subscription may lack quota in the target region, or the machine size may not be available there. Request quota ahead of time and keep alternative sizes. Critical tiers may use capacity reservations.
Q16 Can I use it to migrate servers to Azure?
Replicating and failing over is a form of migration, and it has been used that way. For new migrations Microsoft’s guidance points to Azure Migrate, so check the current recommendation for your case.
Q17 What is zone-to-zone disaster recovery?
Replication between availability zones inside the same region. It protects against the loss of one zone’s data center without moving to another region, and it keeps data within the region.
Q18 What is the best way to learn it?
In a test subscription, create two small virtual machines, enable replication to a second region, wait until protected, then run a test failover and a cleanup. Then build a recovery plan with an order and run it. Doing the whole loop once teaches more than reading about each piece separately.

22Summary and Key Takeaways

You began with a bakery whose kitchen flooded overnight. You now have the blueprint for a second kitchen that is ready when you need it.

Azure Site Recovery continuously replicates the disks of your virtual machines and physical servers to another region or to Azure, keeping a rolling set of recovery points. Compute in the target is paid for only when you test or fail over. Recovery plans order the startup, test failovers prove the plan without disturbing production, failover switches the live workload, and reprotect and failback bring you home again. Around this machinery sit the decisions that decide success: business targets for RPO and RTO, a prepared target network and shared services, consistency choices for databases, security of the recovery path, honest cost planning, and continuous monitoring and rehearsal.

Key takeaways

  • Start with RPO and RTO. Business targets per application decide the method, the tier, and the budget.
  • Replicate disks, pay for compute only when needed. This is why Site Recovery is far cheaper than a duplicate environment.
  • Prepare everything around the machines. Networks, DNS, load balancers, keys, quota, and shared services are not copied and must exist in the target.
  • Choose consistency deliberately. Use application-consistent points for databases, and native database replication when data loss must be minimal.
  • Drill, measure, and fix. Regular test failovers, timed against the RTO and checked from a business view, turn a hope into a capability.
  • Secure the recovery path. Least privilege, locks, alerts, and keys available in the target, with backups kept separately for ransomware.
  • Watch it every day. Replication health, current RPO, quota, and test age are the signals that tell you the promise still holds.
i
Where to go next

Build a small project in a test subscription: two virtual machines, a vault in the target region, a replication policy, network mapping, a recovery plan with two groups, and a test failover with cleanup. Then read the current Microsoft documentation for details that change quickly, such as the support matrix, limits, replication appliance versions, and pricing.