DR (Disaster Recovery) — recovery after disaster. BC (Business Continuity) — business continuity.
Metrics:
DR Strategies:
1. Backup & Restore (RPO=24h, RTO=4h):
1velero schedule create daily-backup --schedule="@daily"2pg_dump -U postgres mydb | aws s3 cp - s3://backups/db.sql
2. Pilot Light (RPO=1h, RTO=30min): Minimal standby (only DB + DNS).
3. Warm Standby (RPO=15min, RTO=10min): Reduced copy of production.
4. Multi-Site Active-Active (RPO≈0, RTO≈0): Full copies in two regions.
Kubernetes DR (Velero):
1# Backup2velero backup create prod-backup-$(date +%Y%m%d) --include-namespaces production34# Restore to another cluster5velero restore create --from-backup prod-backup-20240115 \6 --namespace-mappings production:dr-production
Multi-Region DNS failover:
1resource "aws_route53_health_check" "primary" {2 fqdn = "primary.myapp.com"3 port = 4434 type = "HTTPS"5 failure_threshold = 36 request_interval = 107}89resource "aws_route53_record" "failover" {10 zone_id = aws_route53_zone.main.zone_id11 name = "myapp.com"12 type = "A"13 failover_routing_policy {14 type = "FAILOVER"15 }16 set_identifier = "primary"17 health_check_id = aws_route53_health_check.primary.id18 alias {19 name = aws_lb.primary.dns_name20 zone_id = aws_lb.primary.zone_id21 }22}
Testing: Regular DR drills (once per quarter).