Skip to main content

Overview

DR automation reduces manual intervention during failover by orchestrating the recovery sequence, updating external systems, and validating service health automatically. Well-tested automation is the difference between a 30-minute RTO and a 3-hour one.
Prerequisites
  • Recovery plans created and in ACTIVE replication status
  • Recovery runbook scripts tested against DR test instances before production use
  • Automation hook scripts stored in a version-controlled location accessible from DR site

Automatic Failover Triggers

Configure health checks that trigger failover automatically when the primary site is unreachable, without requiring manual operator intervention.
Navigate to Disaster Recovery → Recovery Plans → [Plan] → Automatic Triggers:
Automatic failover bypasses the manual confirmation step. Enable only for workloads where downtime cost exceeds the risk of an unnecessary failover. Configure the failure threshold high enough to avoid triggering on transient network blips.

Recovery Runbook Scripts

Runbook scripts add application-level coordination to the automated recovery sequence. Scripts run before or after each resource group recovers.

Script Environment

Scripts receive the following environment variables from the XDR runtime:

Script Requirements

  • Must exit 0 for success — any non-zero exit halts recovery and triggers an alert
  • Timeout: 300 seconds (configurable per hook)
  • Must be idempotent — scripts may be retried after transient failures
  • Output is captured in the runbook log — keep output concise and meaningful

Example Scripts

post-recover: update internal DNS
post-recover: update service registry
pre-failover: notify on-call team

Attaching Scripts to Resource Groups

Navigate to Disaster Recovery → Recovery Plans → [Plan] → [Group] → Hooks and click Add Hook. Paste the script content or reference a stored script path.

Replication Scheduling

For asynchronous replication, configure replication windows to control when replication traffic runs and how much bandwidth it consumes. Navigate to Disaster Recovery → Recovery Plans → [Plan] → Replication Schedule: Configure these settings directly in the replication schedule panel for each recovery plan.
Scheduled replication increases RPO to the interval between replication windows. Use continuous replication for any workload with an RPO shorter than the replication interval.

Testing Automation

Always validate runbook scripts with a DR test before relying on them in a real failover. Navigate to Disaster Recovery → Protection Plans → [Plan] and click Test Failover to exercise runbook scripts in an isolated environment. After the test completes, review the runbook execution log in Disaster Recovery → Test Sessions → [Session] → Runbook Log.
After any change to a runbook script, run a DR test immediately to confirm the updated script completes successfully. A script that fails silently during a test will halt recovery during an actual disaster.

Next Steps

Recovery Plans

Configure resource groups and health checks

Monitoring

Alert on automation failures and replication lag

XDR User Guide — DR Testing

Run DR tests to validate runbook scripts and measure RTO

Troubleshooting

Diagnose runbook script failures and unexpected failovers