Disaster Recovery

Azure-to-Azure DR with XReplicator v1.3.1

XReplicator v1.3.1 supports Azure-to-Azure DR setup through the web UI: keep staging disks synced, validate readiness with strict precheck, trigger failover into a target Azure resource group, VNet, subnet, and VM size, and prepare failback when the primary side is ready. In measured drills on a VM with a 30 GB OS disk and 4 GB data disk, failover completed in under 40 seconds with attach-as-is disks and around 70 seconds when creating disks from snapshots.

RTO varies with Azure API latency, VM type, OS boot time, network dependencies, application startup, and whether the blueprint attaches staged disks directly or creates isolated snapshot copies. The CLI runbook below remains useful for manual recovery and validation.

v1.3.1 supported path

Orchestrated Azure-to-Azure DR

  • Run the XReplicator backup server and web UI in the Azure DR landing zone.
  • Enable DR for Azure VM source disks and let XReplicator keep staging disks synced.
  • Create a DR blueprint that maps source disks to Azure region, resource group, VNet, subnet, VM size, and disk strategy.
  • Use strict precheck before failover so only healthy, fully synced sources can be started.
  • Trigger failover from the UI to create the recovered Azure VM and attach or create the recovered data disks.
  • Use Failback after validation to map the DR VM back to the original primary disks.

This is the recommended v1.3.1 path for Azure-to-Azure DR. Use the manual commands below when you need a CLI-controlled recovery procedure.

Failover Strategy RTO

Attach as-is

Under 40 seconds measured on a 30 GB OS disk plus 4 GB data disk when staged disks were healthy and synced.

Create from snapshot

Around 70 seconds measured for the same VM while creating isolated snapshot-derived disks.

Manual Recovery Workflow

  1. Restore source OS and data disks to staging host-attached disks with XReplicator.
  2. Create managed snapshot from restored OS disk.
  3. Create image (or managed OS disk) from snapshot.
  4. Create DR VM from image or attached OS disk.
  5. Attach restored data disks to DR VM and validate services.

Prerequisites

  • Backup server reachable from DR subscription/network.
  • Staging VM with XReplicator agent connected.
  • Target managed disks sized equal to source disks.
  • No formatting needed on target disks before restore.

CLI Commands

Run after XReplicator has restored OS and data disks on the staging VM.

Set variables

# Required variables
export RG=dr-resource-group
export LOCATION=eastus
export DR_VM=dr-recovered-vm
export VNET=vnet-dr
export SUBNET=subnet-dr
export NSG=nsg-dr
export SIZE=Standard_D4s_v5

# Restored managed disks (from XReplicator restore on staging host)
export RESTORED_OS_DISK=restored-os-disk
export RESTORED_DATA_DISK_1=restored-data-disk-1
export RESTORED_DATA_DISK_2=restored-data-disk-2

Create OS disk snapshot

# 1) Create snapshot from restored OS disk
az snapshot create \
  --resource-group "$RG" \
  --name dr-os-snap-$(date +%Y%m%d%H%M%S) \
  --location "$LOCATION" \
  --source "$RESTORED_OS_DISK"

OS_SNAP_ID=$(az snapshot list -g "$RG" --query "[?contains(name,'dr-os-snap')]|[-1].id" -o tsv)
echo "OS snapshot: $OS_SNAP_ID"

Snapshot to image / OS disk conversion

# 2A) Option A: Create image from snapshot (recommended for repeatability)
az image create \
  --resource-group "$RG" \
  --name dr-os-image-$(date +%Y%m%d%H%M%S) \
  --source "$OS_SNAP_ID" \
  --location "$LOCATION"

IMAGE_ID=$(az image list -g "$RG" --query "[?contains(name,'dr-os-image')]|[-1].id" -o tsv)
echo "Image: $IMAGE_ID"

# 2B) Option B: Create managed OS disk directly from snapshot
az disk create \
  --resource-group "$RG" \
  --name dr-os-disk-$(date +%Y%m%d%H%M%S) \
  --source "$OS_SNAP_ID" \
  --location "$LOCATION"

OS_DISK_NAME=$(az disk list -g "$RG" --query "[?contains(name,'dr-os-disk')]|[-1].name" -o tsv)
echo "OS Disk: $OS_DISK_NAME"

Bring up DR VM (image path)

# 3A) Bring up VM from image
az vm create \
  --resource-group "$RG" \
  --name "$DR_VM" \
  --image "$IMAGE_ID" \
  --size "$SIZE" \
  --vnet-name "$VNET" \
  --subnet "$SUBNET" \
  --nsg "$NSG" \
  --public-ip-sku Standard

Bring up DR VM (OS disk path)

# 3B) Bring up VM from managed OS disk
az vm create \
  --resource-group "$RG" \
  --name "$DR_VM" \
  --attach-os-disk "$OS_DISK_NAME" \
  --os-type linux \
  --size "$SIZE" \
  --vnet-name "$VNET" \
  --subnet "$SUBNET" \
  --nsg "$NSG" \
  --public-ip-sku Standard

Attach restored data disks

# 4) Attach restored data disks to DR VM
az vm disk attach \
  --resource-group "$RG" \
  --vm-name "$DR_VM" \
  --name "$RESTORED_DATA_DISK_1"

az vm disk attach \
  --resource-group "$RG" \
  --vm-name "$DR_VM" \
  --name "$RESTORED_DATA_DISK_2"

Validation Checklist

  • DR VM boots cleanly from restored image/OS disk.
  • All expected data volumes are attached and mounted.
  • Application health checks pass.
  • Traffic cutover and DNS updates are completed.