Perform failover to a secondary region using Site Recovery

Implement backup and recovery

📘Microsoft Certified: Azure Administrator Associate (AZ-104)


Azure Site Recovery (ASR) is an Azure service that helps you keep your applications and workloads running when there’s a problem in the primary region. If the primary region fails, ASR allows you to failover your virtual machines (VMs) and services to a secondary region, ensuring business continuity.

Failover is a critical skill for the AZ-104 exam, as it demonstrates your ability to maintain availability during disasters.


1. Key Concepts

Before performing a failover, you need to understand these key concepts:

  1. Primary Region: The main Azure region where your applications and VMs are currently running.
  2. Secondary Region (Recovery Region): The backup Azure region where your applications can run if the primary region goes down.
  3. Failover: The process of switching your workloads from the primary region to the secondary region.
  4. Recovery Plan: A pre-defined plan in ASR that specifies the order and conditions for failing over multiple VMs and services.
  5. Test Failover vs. Planned Failover vs. Unplanned Failover:
    • Test Failover: Run a failover in an isolated environment without affecting production. Used to verify disaster recovery.
    • Planned Failover: Triggered when the primary site is still available but needs maintenance. VMs are synchronized before failover.
    • Unplanned Failover: Triggered when the primary site is unavailable due to an outage. VMs failover using the last replicated data.

2. Prerequisites

Before you can failover to a secondary region:

  • Site Recovery must be set up:
    • A Recovery Services vault exists in the secondary region.
    • VMs in the primary region are replicated to the secondary region.
  • Networking is configured in the secondary region to support the failed-over VMs.
  • You must have proper permissions:
    • Typically, Contributor or Owner role on the Recovery Services vault and the VMs.

3. Steps to Perform Failover

Failover can be done through the Azure portal, PowerShell, or Azure CLI. Here’s the simplified Azure portal approach:

Step 1: Open the Recovery Services Vault

  1. Go to Azure Portal → Recovery Services Vaults.
  2. Select your vault that is associated with the primary region.

Step 2: Select Replicated Items

  1. In the vault, click “Replicated items”.
  2. Choose the VM or application you want to failover.

Step 3: Start the Failover

  1. Click “Failover”.
  2. Select the Recovery Point:
    • Latest: Uses the most recent replicated data.
    • Custom: Choose a specific recovery point.
  3. Select the Failover Type:
    • Test Failover – for testing without impacting production.
    • Planned Failover – for maintenance.
    • Unplanned Failover – for disasters.

Step 4: Initiate the Failover

  1. Click “OK” or “Failover”.
  2. ASR starts creating the VMs in the secondary region.

Step 5: Commit the Failover (Important!)

  1. After a Test Failover, you must commit or cleanup:
    • Commit: Finalize the failover; VMs become the new production.
    • Cleanup: Remove the test VMs without affecting production.

4. Failover Behavior and Considerations

  • VM State: During planned failover, ASR syncs the last data. During unplanned failover, some data might be lost depending on the last replication.
  • IP Addresses: Public IPs may change unless you configure them with Azure Front Door or Traffic Manager.
  • Networking: Ensure the secondary region has virtual networks and subnets configured.
  • Applications: Multi-tier applications can be included in a Recovery Plan, which controls the startup order of servers (e.g., database first, then web server).

5. Testing Failover

  • Test Failover is critical:
    • It ensures your disaster recovery plan works.
    • Can verify network, applications, and VM functionality.
    • Doesn’t affect the primary VMs.

Tip for exam: Microsoft often tests whether you know the difference between test, planned, and unplanned failover, and how to commit or cleanup after testing.


6. Exam Tips

  1. Remember Failover Types:
    • Test → safe, isolated
    • Planned → maintenance, no downtime
    • Unplanned → disaster, may lose some data
  2. Recovery Plans:
    • Useful for applications with multiple VMs.
    • Controls the order of startup.
  3. Failback:
    • After the primary region is restored, you can failback to it.
    • Failback requires re-replication from secondary to primary region.
  4. Azure Portal Navigation:
    • Recovery Services Vault → Replicated Items → Failover → Recovery Point → Failover Type → Commit/Cleanup

7. Example Scenario (IT-focused)

  • A company has 3 VMs running a web app in East US.
  • These VMs are replicated to West US.
  • East US has an outage.
  • Administrator performs an unplanned failover using the latest recovery point.
  • VMs start in West US. Users can access the web app with minimal downtime.
  • After testing, the failover is committed.
  • Once East US is back, the admin can failback the VMs to the primary region.

Summary for Exam:

  • ASR enables replication and failover of Azure VMs and workloads.
  • Failover Types: Test, Planned, Unplanned.
  • Failover Steps: Select VM → Failover → Recovery Point → Type → Commit/Cleanup.
  • Recovery Plans: Control multi-VM application startup order.
  • Failback: Restore workloads to the primary region after disaster is resolved.
  • Key Skills: Knowing when to use each failover type, how to commit, and testing failover.

Leave a Reply

Your email address will not be published. Required fields are marked *

Buy Me a Coffee