0Pricing
Cloud & IT Cert Prep · Lesson

DR Testing Without Impact

Run a test failover to an isolated network to validate the recovery plan end-to-end, measure actual RTO, and document gaps for remediation.

DR Testing Without Impact is a free Cloud & IT Cert Prep lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cloud & IT Cert Prep learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Why DR Testing Is Non-Negotiable

A disaster recovery plan that has never been tested is only a hypothesis. Real-world experience shows that DR plans frequently reveal gaps — configuration drift, missing automation, outdated runbooks, or longer-than-expected startup times — that only surface under test conditions. Regular DR testing is the only way to have confidence that your plan will work when you need it most.

The Test Failover Feature

Test Failover is a built-in Azure Site Recovery feature that lets you simulate a failover to the secondary region without interrupting production. During a test failover, ASR creates copies of the replicated VMs in an isolated virtual network in the secondary region. Production VMs continue running normally in the primary region, so there is no risk to live users.

# Trigger a test failover for a recovery plan:
az site-recovery recovery-plan test-failover \
  --resource-group myRG \
  --vault-name myRecoveryVault \
  --name myRecoveryPlan \
  --failover-direction PrimaryToRecovery \
  --network-id '/subscriptions/.../virtualNetworks/testFailoverVNet'

Isolating the Test Environment

The isolated test VNet must not have connectivity to production systems. This prevents test VMs from accidentally writing to the production database, sending emails to real customers, or triggering payment transactions. Create a dedicated test failover VNet with no peering to production VNets and no internet access, then use it exclusively for DR drills.

# Create an isolated test VNet for DR drills:
az network vnet create \
  --resource-group drRG \
  --name testFailoverVNet \
  --address-prefix 10.99.0.0/16 \
  --subnet-name testSubnet \
  --subnet-prefix 10.99.1.0/24
# NOTE: Do NOT peer this VNet to any production VNet

What to Validate During a DR Test

A DR test should validate a specific set of criteria:

  • Boot time — do all VMs start within the expected time window?
  • Application startup — does the application initialise correctly when connected to the recovered database?
  • Data integrity — is the data at the recovery point consistent and complete?
  • Actual RTO — measure the total elapsed time from failover trigger to application serving requests
  • Runbook execution — did all automation scripts complete successfully?

Measuring Actual RTO

During the test, start a timer the moment you trigger the test failover. Stop the timer when the application is confirmed healthy (load balancer health probe returns 200 OK). This is your actual RTO. Compare it to your target RTO. If the actual exceeds the target, identify the bottlenecks — slow VM startup, long database initialisation, DNS propagation delay — and address them.

# During DR test, record timestamps:
# T0: Test failover triggered
# T1: All VMs in group 1 (database) running
# T2: All VMs in group 2 (app tier) running
# T3: All VMs in group 3 (web tier) running
# T4: Health probe returns 200 OK on all instances
# Actual RTO = T4 - T0
# Compare to target RTO, document any gaps

Checking Data at the Recovery Point

After the test failover completes, connect to the recovered database and verify the data. Check that transactions committed before the replication cutoff are present, and that partially committed transactions are handled correctly (rolled back or completed). For databases with point-in-time restore (PITR), test restoring to a specific timestamp and verify the expected data state.

# Example data verification after test failover:
# 1. Connect to recovered database
# 2. Run: SELECT COUNT(*) FROM orders WHERE created_at > DATEADD(hour, -1, GETUTCDATE())
# 3. Compare count to production database count for the same window
# 4. Check for any orphaned records or constraint violations

Cleaning Up After a Test Failover

When the test is complete, you must clean up test failover resources — the test VMs, their disks, and network interfaces in the secondary region. Azure Site Recovery provides a 'Cleanup test failover' action in the portal that removes all test resources automatically. Forgetting to clean up wastes money and clutters the secondary region with stale resources.

# Trigger cleanup after test failover:
az site-recovery recovery-plan test-failover-cleanup \
  --resource-group myRG \
  --vault-name myRecoveryVault \
  --name myRecoveryPlan \
  --notes 'Test completed. RTO = 22 minutes. All checks passed.'

Documenting DR Test Results

After each DR test, write a test report that includes: the date and scope of the test, the actual RTO and RPO achieved, a checklist of validation items with pass/fail status, any gaps or failures observed, and the corrective actions planned. This report is valuable for compliance audits (ISO 27001, SOC 2, HIPAA) and for tracking improvement in DR maturity over time.

Frequency of DR Testing

Industry best practices and compliance frameworks typically require DR tests at minimum annually, but many organisations test quarterly or even monthly for Tier 1 workloads. More frequent testing catches configuration drift earlier and builds team confidence and muscle memory. Automate as much of the test setup and verification as possible to reduce the effort of frequent testing.

Azure Chaos Studio for Resilience Testing

Azure Chaos Studio is a managed chaos engineering service that lets you inject controlled failures into Azure resources to test application resilience. You can shut down VMs, fail zones, throttle CPU, or inject network latency to observe how your application behaves. Unlike a standard DR drill, chaos engineering tests whether your application degrades gracefully under partial failure conditions.

# Chaos Studio experiment: shut down a VM zone
# 1. Create a chaos experiment in the portal
# 2. Select fault: 'VM Shutdown'
# 3. Target: VMs in Zone 1
# 4. Duration: 10 minutes
# 5. Observe: Does Traffic Manager reroute to Zone 2?
# 6. Check: Application health during and after the fault

Continuous DR Improvement Cycle

DR testing is most valuable as part of a continuous improvement cycle: Plan → Execute → Measure → Remediate → Repeat. After each test, address the gaps found, update runbooks and documentation, and then test again. Over time, the gap between your stated RTO/RPO targets and your actual achieved values should narrow until you consistently pass every test within tolerance.

Quick Check

Test your understanding of Microsoft Azure Fundamentals (AZ-900) concepts from this lesson.

Lesson Recap

In this lesson you learned: test failover lets you simulate a DR event without interrupting production by creating copies of VMs in an isolated VNet; you must measure actual RTO and verify data integrity during the test; and you should clean up test resources and document results after each drill. Next up we explore disaster recovery specifically for PaaS services like Azure SQL Database.

Frequently asked questions

Is the “DR Testing Without Impact” lesson free?

Yes — the full text of “DR Testing Without Impact” is free to read here on the web, and the Cloud & IT Cert Prep course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cloud & IT Cert Prep course, upgrade to CoddyKit PRO.

What will I learn in “DR Testing Without Impact”?

Run a test failover to an isolated network to validate the recovery plan end-to-end, measure actual RTO, and document gaps for remediation. You practise Cloud & IT Cert Prep with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Cloud & IT Cert Prep?

No prior experience is required. Cloud & IT Cert Prep on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “DR Testing Without Impact” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Cloud & IT Cert Prep lesson?

Yes. Every Cloud & IT Cert Prep lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Defining RTO, RPO, and Recovery Tiers
  2. Recovery Plans and Automated Failover
  3. DR Testing Without Impact
  4. DR for PaaS Services
← Back to Cloud & IT Cert Prep