Developing a Disaster Recovery Plan for Your Infrastructure
Most companies remember disaster recovery only after the first serious incident. A data center outage, a mistakenly deleted production database, a compromised cloud account wiping all resources — that's when you discover backups exist but nobody knows how to restore them, and recovery time turns out to be 10 times greater than acceptable. We help prevent these scenarios by designing DR plans that are guaranteed to work at 3 AM without the plan's author.
A DR plan is not a paper document. It is a set of proven technical procedures with specific RTO and RPO that actually work. Our team has 10+ years of experience developing disaster recovery plans for companies of all sizes — from startups to enterprise with compliance requirements.
How to Choose RTO and RPO for Your Services
Inventory critical components. For each service, determine: where data resides, how it's backed up, acceptable downtime (RTO), and maximum data loss (RPO). A typical matrix:
| Component | RPO | RTO | DR Type |
|---|---|---|---|
| PostgreSQL (transactions) | 0 min | 5 min | Streaming replication + failover |
| PostgreSQL (analytics) | 1 hour | 2 hours | pg_dump → S3 |
| File storage | 24 hours | 4 hours | rsync → cross-region S3 |
| Kubernetes state | 1 hour | 2 hours | Velero → S3 |
| DNS | 0 (managed) | 0 (failover) | Route53 health checks |
Document the recovery procedure for each component. Not just "restore DB from backup" but a step-by-step guide with specific commands. Every step must be executable by an on-call engineer without access to the plan's author and without time to think.
Technical Procedures: The Most Valuable Part
For each component in the DR plan, describe three scenarios: partial failure (one node), full failure (loss of entire site), and compromise (attacker deleted data).
Example of PostgreSQL recovery from pg_basebackup:
# 1. Stop the service connected to the DB
systemctl stop app-service
# 2. Clean data directory
rm -rf /var/lib/postgresql/15/main/*
# 3. Restore from the latest backup
aws s3 cp s3://backups-prod/postgresql/basebackup-latest.tar.gz /tmp/
tar xzf /tmp/basebackup-latest.tar.gz -C /var/lib/postgresql/15/main/
# 4. Set recovery target
cat > /var/lib/postgresql/15/main/postgresql.auto.conf << EOF
restore_command = 'aws s3 cp s3://backups-prod/postgresql/wal/%f %p'
recovery_target_time = '2025-01-15 10:00:00'
recovery_target_action = 'promote'
EOF
touch /var/lib/postgresql/15/main/recovery.signal
# 5. Start PostgreSQL and check recovery
systemctl start postgresql
tail -f /var/log/postgresql/postgresql-15-main.log
This level of detail is the only acceptable one for a production DR plan. Recovery from streaming replication is 10 times faster than from a full backup — that's the difference between a minute of downtime and an hour.
Dependency chains. The application won't start without the database. The database won't start without proper network routing. Routing doesn't work without DNS. The plan must explicitly document the order of recovery: first infrastructure (VPC, security groups), then databases, then stateful services, then stateless applications, then DNS and load balancer.
Why Testing the DR Plan Is Critical
Testing reveals hidden problems: outdated scripts, changed software versions, inaccessible backups. We conduct tests in an isolated environment, simulating real failures. Each test ends with a postmortem, and procedures are adjusted. Without regular testing, the plan becomes obsolete within a month.
Example from practice: a client had an RPO of 1 hour, but during testing we found that pg_dump took 2 hours on the production database. We had to switch to pg_basebackup with WAL archiving. The test prevented data loss.
Test results from one project
During a quarterly test, we discovered: incorrect S3 bucket permissions, an outdated MySQL recovery script, and a non-working health check for the load balancer. After fixes, RTO dropped from 4 to 1.5 hours.Infrastructure Code as Part of DR
All infrastructure should be described in Terraform or Ansible — that itself is part of the DR plan. terraform apply on a fresh account should bring up the basic infrastructure without manual steps:
# Initialize in the disaster recovery region
terraform init -backend-config="bucket=tfstate-dr-backup" \
-backend-config="region=eu-central-1"
# Plan without applying
terraform plan -var-file=environments/production-dr.tfvars
# Apply
export TF_VAR_region="eu-central-1"
terraform apply -var-file=environments/production-dr.tfvars -auto-approveTerraform state is stored in S3 with cross-region replication and versioning. Losing the primary region should not mean losing the state file.
Runbooks and Escalation
The DR plan includes runbooks — concise, scenario-based instructions for specific failure types. Each runbook structure: trigger (what happened), diagnosis (how to confirm), recovery steps, verification, and who to notify.
Escalation matrix: who is the first on-call, second on-call, who decides to switch to the backup site, who notifies customers.
How to Create a Runbook in 5 Steps — Setting Up Disaster Recovery
- Identify typical failure scenarios (disk failure, DB crash, deployment error).
- Describe the trigger — a metric or alert that clearly indicates the failure.
- Write diagnostic commands to confirm (e.g.,
pg_isready,curlhealth-check). - Step-by-step recovery with specific commands and scripts.
- Specify how to verify successful recovery and whom to notify.
What's Included in DR Plan Development?
- Audit of the current infrastructure and identification of critical components.
- Definition of target RTO/RPO for each service.
- Development of technical recovery procedures tested on real systems.
- Creation of runbooks for typical failure scenarios.
- Testing of DR procedures in an isolated environment.
- Finalization of documentation and handover to your team (access, training, support).
Work Stages
| Infrastructure Scale | Duration |
|---|---|
| 5-15 components, single region | 1-2 weeks |
| 15-50 components, multi-region | 3-6 weeks |
| Large infrastructure with compliance requirements | from 2 months |
Pricing is determined individually after an infrastructure audit. We have completed over 50 DR projects, and each plan comes with a 6-month validity guarantee.
The average cost of recovery after a failure without a DR plan can reach $1000 per minute. Our clients save up to 80% on recovery costs thanks to pre‑developed procedures. Contact us for a consultation — we'll help prepare your infrastructure for any failure. Get a demo version of our approach on your project.
Definitions of Disaster Recovery and RTO/RPO are given on Wikipedia.







