Azure DR Test: Restore with OpenShift & OADP

Here’s a realistic Azure-specific DR test using
OpenShift Container Platform +
OpenShift API for Data Protection (OADP).

We’ll simulate a namespace + data loss and walk through a full restore using Azure Blob + Disk snapshots.


Scenario (Azure DR test)

my-app namespace deleted
❌ PVC + data gone
❌ Need full recovery from backup

Environment:

  • OADP configured with Azure Blob
  • CSI snapshots enabled (Azure Disk)

What we’re restoring

  • Kubernetes resources (deployments, services, routes)
  • Persistent volumes (via Azure snapshots)
  • Application data

Flow overview

Backup (Blob + Disk Snapshot)
Namespace deleted ❌
Velero Restore triggered
Resources recreated
PVC restored from snapshot
App back online ✅

Step-by-step restore


Step 1: Confirm failure

oc get ns my-app

Should show:

NotFound

Step 2: List available backups

oc get backup -n openshift-adp

Example:

azure-backup Completed

Step 3: Create restore

apiVersion: velero.io/v1
kind: Restore
metadata:
name: restore-my-app
namespace: openshift-adp
spec:
backupName: azure-backup
includedNamespaces:
- my-app

Apply:

oc apply -f restore.yaml

Step 4: Watch restore progress

oc get restore -n openshift-adp

Detailed:

oc describe restore restore-my-app -n openshift-adp

Step 5: Verify namespace restored

oc get ns my-app

Then:

oc get pods -n my-app

Step 6: Verify PVC restoration

oc get pvc -n my-app

Check:

  • Status = Bound

Step 7: Verify Azure disk restore

In Azure:

az disk list --resource-group <rg>

You should see:

  • restored disk from snapshot

Step 8: Check application

oc get routes -n my-app

Test:

curl http://<route>

What just happened

  1. OADP pulled metadata from Azure Blob
  2. Recreated Kubernetes objects
  3. Triggered Azure disk snapshot restore
  4. Reattached volumes to pods

Full app recovery


Real-world variations


Case 1: Partial restore

Restore only one resource:

includedResources:
- deployments

Case 2: Restore to different namespace

namespaceMapping:
my-app: my-app-restore

Case 3: Restore without volumes

restorePVs: false

Azure-specific pitfalls

1. Missing snapshot permissions

→ restore fails silently or PVC stuck


2. Storage class mismatch

→ PVC stays Pending


3. Region mismatch

→ snapshot cannot attach


4. Private cluster networking

→ cannot reach Blob storage


Troubleshooting


Check restore logs

oc logs -n openshift-adp deployment/velero

Check events

oc get events -n my-app

Check PVC issues

oc describe pvc <pvc-name> -n my-app

Pro DR test (recommended)

Simulate:

  1. Backup app
  2. Delete namespace
  3. Restore
  4. Validate data integrity

Do this quarterly


Advanced Azure DR test

Try:

  • Restore to new cluster in different region
  • Reconnect DNS
  • Validate external integrations

Key takeaway

  • Azure DR = Blob (metadata) + Disk snapshot (data)
  • OADP restores both together
  • Works for full or partial recovery

Leave a comment