| |

Disaster Recovery (DR) Multi-Site Playbook: Madrid to Barcelona/Valencia Geographic Failover

Disaster Recovery (DR) Multi-Site Playbook: Madrid to Barcelona/Valencia Geographic Failover
Direct Technical Answer
How Geographic Disaster Recovery Functions for Spain Dedicated Servers

Geographic disaster recovery for a Spain dedicated server pairs a primary Madrid host with an independent Barcelona (~505 km) or Valencia (~300 km) standby using asynchronous database streaming and incremental ZFS snapshots. Real RPO and RTO depend on cold, warm, or hot standby investment—and safe failover requires verified primary fencing before DNS or BGP cutover.

✓300–505 km Separation
✓Async DB + ZFS WireGuard
✓Guarded Fencing Gate
✓Spain ENS & EU DORA
Quick Operational RecommendationIberian Standby Provisioning Directive
The Recommended Baseline: Warm Standby Topology

For most Spanish production stacks, deploy a Warm Standby: stream PostgreSQL or MariaDB asynchronously plus 15-minute syncoid ZFS snapshots over WireGuard to Barcelona or Valencia, maintain 60-second DNS records, and use multi-vantage alerting with human-confirmed promotion (--confirm-failover) rather than blind unattended scripts.

✓5–15 min WAN RPO
✓Zero Grid Hazard Correlation
✓IPMI Hardware STONITH
✓LOPDGDD Data Residency
Enterprise Iberian DR DirectiveMadrid • Barcelona • Valencia Geographic Resilience
Beyond Metro Redundancy: Engineering Multi-City Fault Isolation Across Spain

A disaster recovery spain dedicated server failover plan earns its keep when a Madrid facility suffers a utility, cooling, or carrier outage. Local RAID arrays and dual power feeds protect individual racks, not entire buildings. Turning a Madrid-to-Barcelona or Valencia topology into dependable continuity requires clear RPO/RTO tiers, guarded cutover, and rehearsed failback. This playbook maps standby architectures, compares DNS against BGP failover, and outlines live-fire drills.

×

Single-Facility Risk: Switchgear & cooling plant exposure
✓

Geographic Separation: 300–505 km independent power grids
✓

WAN Transit Performance: 5.5–8.2 ms Iberian optical RTT

Failure-Domain Separation: Why Metro Racks Are Not Geographic DR

Dual power feeds (A+B feeds), mirrored NVMe storage arrays, and redundant Top-of-Rack switches inside a single Madrid facility protect strictly against isolated component wear. When catastrophic external disruptions strike—such as municipal electrical substation explosions during extreme Iberian summer heatwaves, major fiber conduit severance along transport corridors, or facility-wide fire suppression discharges—single-building clustering erases your failover strategy. True resilience demands independent geographic separation.

Automation vs Split-Brain: The Hazard of Unattended Failover Scripts

In production dedicated server environments, blind automated failover scripts often cause worse data corruption than the outages they attempt to resolve. If a brief transit routing hiccup isolates Madrid from the secondary monitoring node while Madrid continues serving Spanish customers, an unattended script promotes Barcelona into a competing primary—splitting customer transactions across two divergent database timelines. Safe failover mandates multi-vantage quorum validation and out-of-band IPMI primary fencing before promotion.

The Neglected Half: Architecting Reverse Replicated Failback

Failing over to Barcelona or Valencia in under 15 minutes is meaningless if repatriating live traffic back to Madrid requires hours of manual database reconciliation. Teams frequently neglect reverse-replication runbooks. When the Madrid host recovers with pre-outage data while production writes continue on the standby, an un-fenced return will overwrite fresh transactions. Documenting reverse differential replication (via pg_rewind, pg_basebackup, and ZFS syncoid) is mandatory before declaring DR readiness.

Iberian Risk Isolation

Madrid to Barcelona (~620 km corridor) or Valencia (~355 km corridor) places standby nodes on separate electrical substations, municipal cooling loops, and regional fiber rings.

Madrid Dedicated Catalog

Onlive Server Spain catalog covers Madrid bare-metal tiers (DSX1–DSX23, $259/mo to $707/mo) with dedicated 1 Gbps unmetered uplinks and out-of-band IPMI.

Reverse Replicated Failback

Enforce strict multi-vantage quorum validation, STONITH IPMI fencing, and reverse delta syncing before returning live production traffic to Madrid.

≡ Disaster Recovery Playbook Table of Contents
[ Click to Toggle ]



Defining Realistic RPO and RTO Before Buying Secondary Hardware

Every disaster recovery design balances downtime cost against standby infrastructure spend. Define two measurable targets before ordering secondary bare metal:

  • Recovery Point Objective (RPO): Maximum acceptable data loss when Madrid drops (24 hours needs nightly off-site backups; < 5 minutes demands continuous WAL/binlog streaming plus frequent ZFS deltas).
  • Recovery Time Objective (RTO): Total elapsed time until users transact normally (Detection + Verification + Promotion + App Startup + DNS/BGP Propagation + Smoke Checks).

Practical Business Impact Tiering

Classify production workloads using a structured financial impact threshold (Revenue Loss + SLA Penalty Credits + Engineering Labor):

  1. Tier 0 (Checkout, Payment APIs, Core Auth): RPO ≤ 1–5 min, RTO ≤ 15–30 min → Warm Standby or Hot Active-Passive in a second city.
  2. Tier 1 (Internal ERP, CRM, Support Portals): RPO ≤ 15–60 min, RTO ≤ 2–4 hr → Pilot Light or automated Cold Standby rebuild.
  3. Tier 2 (BI Reporting, Marketing, Archives): RPO ≤ 24 hr, RTO ≤ 12–24 hr → Daily immutable off-site backup restore.

Restricting standby hardware strictly to Tier 0 and Tier 1 services keeps multi-city spending sustainable while guaranteeing business continuity where it matters most.

Why Single-Datacenter Redundancy Is Not Geographic Disaster Recovery

Running two servers inside the same Madrid datacenter—even across separate cabinets with RAID 10 NVMe—provides High Availability (HA), not Disaster Recovery (DR). Both nodes still share facility switchgear, summer cooling plants, metro carrier entrances, and single-account API blast radius (see our technical guide on immutable ransomware defense and backup strategies for Spanish servers for credential-isolated backup defense).

Spanish & European Regulatory Context: DORA, ENS & LOPDGDD

In regulated Spanish and European environments, disaster recovery architecture is audited against strict statutory frameworks:

  • EU DORA (Regulation (EU) 2022/2554): Mandates tested ICT continuity plans and formal management of ICT third-party concentration risk for financial entities operating across the European Union.
  • Spain ENS (Royal Decree 311/2022): Requires Medium/High-category public-sector systems and enterprise suppliers to maintain risk-assessed alternate recovery sites geographically separated from primary processing.
  • ISO/IEC 27001: Requires documented recovery objectives, segregated backups, and auditable periodic drills proving data resilience.



Iberian Multi-Site Interconnect

Geographic Fault Domain Separation

Cross-City Geographic Pairing: Madrid Primary with Barcelona, Valencia & Bilbao Standbys

Pairing Madrid with Barcelona (~505 km straight-line; ~620 km fiber corridor), Valencia (~300 km straight-line; ~355 km corridor), or Bilbao (~325 km straight-line; ~395 km corridor) isolates power substations and regional fiber rings while retaining domestic Spanish data residency under Organic Law 3/2018 (LOPDGDD, BOE-A-2018-16673).

Secondary Hub A: Barcelona (~505 km NE)
Catalonia regional grid isolation, Mediterranean subsea cable landings to Marseille and Genoa, and 5.5–7.5 ms WAN RTT from Madrid.

Secondary Hub B: Valencia (~300 km East)
Eastern Iberian coastal grid, distinct municipal telecom transit loop, and ultra-fast 3.8–5.2 ms WAN RTT along the A-3 rail fiber route.

Secondary Hub C: Bilbao (~325 km North)
Northern Atlantic electrical grid isolation, Bay of Biscay telecom ring, and 4.2–5.8 ms WAN RTT under 100% Spanish data residency.



Hardware Catalog Disclosure

Madrid Production DC • Multi-Vendor Pairing

Verified Onlive Server Spain Catalog Disclosure & Multi-Vendor Independence

Provider Diversity Note: Onlive Server's verified Spain catalog covers Madrid bare metal (DSX1 through DSX23). Before ordering disaster-resilient Spain dedicated server solutions, confirm with support whether secondary Spanish city stock exists—or deliberately place your Barcelona/Valencia standby with a second independent Spanish host to eliminate single-vendor concentration risk.

Primary Provisioning
Madrid Premier Facility
23 Bare-Metal Plans (DSX1–DSX23)

Hardware Price Range
$154 – $1,151 / month
Dedicated 1 Gbps – 10 Gbps Ports

Multi-Vendor DR Setup
Barcelona / Valencia Standby
Zero Management Correlation

Warm Standby vs Cold Standby vs Active-Passive Multi-City Topologies

Choosing the right standby architecture determines how fast you recover and how much idle silicon you pay for every month. The following matrix details the four disaster recovery standby tiers evaluated across Spanish metropolitan fiber routes:

DR Topology Typical RPO Typical RTO Replication Mechanism Primary Madrid Hardware Reference Standby Cost & Operational Profile
Cold Standby (Backup + On-Demand Restore) 1–24 hours 4–24 hours Immutable off-site backups (Proxmox Backup Server / restic / S3 Object Lock) DSX15 (Xeon Silver 4116, 96 GB, 2×1 TB NVMe — $259/mo) + off-site vault Lowest monthly spend; slowest recovery due to bare-metal provisioning and full multi-terabyte restore time.
Pilot Light (Always-On DB Standby, Scaled-Down App) Seconds to 5 min 30–90 minutes Async PostgreSQL/MariaDB streaming + periodic syncoid ZFS snapshots DSX14 (EPYC 7662 64C, 512 GB, 2×3.84 TB NVMe — $305/mo) Secondary DB server stays warm and synchronized; app containers/VMs boot only during failover declaration.
Warm Standby (Pre-Provisioned Secondary Stack) Seconds to 5 min 15–30 minutes Continuous async DB replication + 5–15 min incremental ZFS snapshots over WireGuard DSX14 ($305/mo) or DSX7 (EPYC 7502P 32C, 256 GB, 2×1.92 TB NVMe — $531/mo) Balanced enterprise sweet spot: secondary OS, TLS certs, firewalls, and DB replica run 24/7 ready to promote.
Hot Active-Passive (Full Capacity Standby) Sub-second to seconds 5–15 minutes Continuous async DB streaming + real-time object sync + active health-checked load balancers DSX8 (512 GB, 2×4 TB NVMe — $707/mo) or DSX21 (768 GB, 10 Gbps — $1,151/mo) Highest standby cost (full matching capacity), minimal cutover delay once fencing is confirmed.

Cross-Border Notice: If your architecture requires active writes in two European countries simultaneously rather than single-country DR, review the WAN commit physics and quorum constraints in our guide on active-active cross-border database replication between Madrid and Frankfurt.

Synchronizing Filesystems & Databases Cleanly Between Cities

Keep storage-level and database-level replication decoupled—never rely solely on filesystem snapshots of a live, unquiesced database directory when native WAL/binlog streaming is available:

  1. Databases (PostgreSQL / MariaDB): Run continuous asynchronous physical streaming (PostgreSQL walreceiver with wal_compression = zstd and a capped max_slot_wal_keep_size) or MySQL/MariaDB GTID replication inside an encrypted WireGuard tunnel. Measure real-world RTT and throughput between your Madrid and Barcelona/Valencia hosts directly using mtr and iperf3 before setting alert thresholds.
  2. Application Media, Uploads & VM Disks (syncoid / ZFS): Use Sanoid + Syncoid (or zrepl) to push incremental ZFS block deltas every 5 to 15 minutes over SSH/WireGuard. Only modified ZFS blocks traverse the Iberian fiber link.




BASH — INCREMENTAL ZFS SYNCOID REPLICATION OVER WIREGUARD
# Incremental ZFS snapshot replication from Madrid to Barcelona/Valencia standby
# Run via systemd timer every 15 minutes over WireGuard (10.90.2.20) with bandwidth throttling
syncoid \
  --no-sync-snap \
  --compress=zstd-fast \
  --source-bwlimit=50m \
  --sshport=2222 \
  tank/app-uploads [email protected]:tank/dr-uploads

Capping --source-bwlimit prevents a large batch upload from saturating your primary uplink or starving database WAL replication packets during business hours.

DNS Low-TTL vs BGP Failover Mechanics & Split-Brain Guards

Promoting the Barcelona or Valencia database is useless until Spanish end-user traffic stops hitting dead Madrid IP addresses. Two traffic-rerouting mechanisms dominate dedicated server DR: API-driven low-TTL DNS failover and BGP prefix redirection.

Criterion Low-TTL API DNS Failover (Cloudflare / Route 53 / NS1) Multi-Site BGP Announcement / Anycast
Prerequisites Standard domain + authoritative DNS provider with health-check API Own RIPE NCC ASN, Provider-Independent (/24 IPv4 / /48 IPv6) prefix, RPKI ROAs, and confirmed BGP sessions at both providers
Convergence Speed Governed by TTL (60s recommended floor); note some Spanish residential ISP resolvers cache past 30s TTLs Typically 30–180 seconds globally once withdrawal propagates across DFZ routers
Client Compatibility Works cleanly with standard HTTPS browsers; watch hardcoded IP clients or long-lived TCP/JVM DNS caches Transparent to hardcoded IPs and stubborn DNS caches
Operational Risk Low complexity; easy to stage on canary subdomains (dr-test.example.es) High complexity; misconfigured BGP filters can cause regional route blackholes

For 90% of Spanish businesses without dedicated network engineering teams and a RIPE /24 allocation, authoritative DNS with 60-second TTLs fronted by a reverse proxy/WAF is safer, cheaper, and vastly easier to test than multi-provider BGP.

Why Blind Automated Failover Scripts Cause Split-Brain

Many generic guides publish a 40-line Bash cron script that pings Madrid three times, promotes the Barcelona database, and flips DNS automatically. In production, unattended single-probe failover is a split-brain factory. If a brief 45-second peering flap hides Madrid from Barcelona while Madrid is still happily serving Spanish customers over another transit carrier, an unattended script promotes Barcelona into a second active primary, splitting customer orders across two irreconcilable databases.

SPLIT-BRAIN & DATA-LOSS WARNING: Never run database promotion (pg_ctl promote or STOP REPLICA; SET GLOBAL read_only = OFF;) until you have verified from at least two independent external monitoring vantage points (plus Madrid out-of-band IPMI/KVM console if reachable) that Madrid is genuinely unreachable or powered off/fenced. If Madrid is still alive behind a partial routing outage, explicitly fence it (drop incoming client traffic at its firewall/load balancer or power it down via IPMI) before promoting the secondary site.




BASH — GUARDED DR PROMOTION SCRIPT (BARCELONA / VALENCIA)
#!/usr/bin/env bash
# Guarded DR Promotion Guardrail Script (Run on Barcelona/Valencia Standby)
# Requires explicit --confirm-failover flag after operator verifies Madrid fencing.
set -euo pipefail

if [[ "${1:-}" != "--confirm-failover" ]]; then
  echo "ABORTED: Verify multi-vantage outage & Madrid primary fencing first."
  echo "Re-run with: $0 --confirm-failover"
  exit 1
fi

echo "[1/4] Checking PostgreSQL standby recovery status and last received LSN..."
sudo -u postgres psql -Atc "SELECT pg_is_in_recovery(), pg_last_wal_receive_lsn(), pg_last_wal_replay_lsn();"

echo "[2/4] Promoting PostgreSQL standby to read-write primary..."
sudo -u postgres pg_ctlcluster 16 main promote

echo "[3/4] Updating local Nginx/HAProxy maintenance flag and running write smoke test..."
sudo systemctl reload nginx
curl -fsS --max-time 5 http://127.0.0.1:8080/healthz

echo "[4/4] Triggering authoritative DNS API cutover (placeholder — inject vaulted token)..."
# curl -fsS -X PATCH "https://api.dns-provider.example/v1/records/$RECORD_ID" ...
echo "FAILOVER COMPLETE: Record incident timestamp and begin monitoring standby write load."

Store DNS API tokens in a segregated secrets vault accessible from the secondary city (never exclusively inside the Madrid datacenter that just went dark!).

Running Scheduled DR Drills & Executing Clean Failback

A disaster recovery runbook that sits untouched in a wiki for 14 months will fail during a real emergency because TLS certificates expire, firewall rules drift, and new database tables get added without updating ZFS datasets. Run shadow-network drills quarterly and controlled maintenance-window failovers annually:

Phase Step Verification Evidence to Record
1. Quarterly Shadow Drill (Zero User Impact) Clone latest ZFS snapshot on the standby (zfs clone) and boot an isolated PostgreSQL copy on an internal port (5433) without touching live replication. Verify application boots against cloned data, run read/write integrity queries, and confirm TLS certs & secrets are current.
2. Pre-Cutover Parity Audit Diff /etc/nftables.conf, systemd units, cron jobs, and package versions between Madrid and Barcelona/Valencia via Ansible --check --diff. Zero critical drift in firewall rules, kernel sysctl limits, or database extensions.
3. Timed Failover Rehearsal During a scheduled maintenance window, freeze writes on Madrid cleanly, execute the guarded promotion script, flip DNS to standby, and run end-to-end checkout/login tests. Document actual measured RTO (minutes elapsed) and RPO (zero loss on planned drill; last replication timestamp on simulated crash).
4. Clean Failback Preparation (Do NOT Rush) Never immediately flip DNS back to Madrid once power returns! First inspect Madrid hardware/filesystem integrity via IPMI/SMART, and configure Madrid as an asynchronous replica pulling from Barcelona/Valencia. Confirm Madrid catches up cleanly (pg_rewind if wal_log_hints=on, or fresh pg_basebackup if timelines diverged) and reverse ZFS syncoid deltas finish syncing.
5. Controlled Return to Primary Schedule a brief read-only window (e.g., 03:00 CET), stop writes on Barcelona/Valencia, verify final LSN equals Madrid's replayed LSN, promote Madrid, switch DNS back, and re-establish forward Madrid → Standby replication. Confirm replication lag returns to normal and archive post-mortem lessons + updated runbook timings for DORA / ISO 27001 audit evidence.

Treating failback as a deliberate, reverse-replicated maintenance event prevents the second most common DR catastrophe: overwriting four hours of live customer orders collected in Barcelona with stale pre-outage data still sitting on Madrid's disks.



Frequently Asked Questions

Q1
Does Spain's ENS or EU DORA legally require an exact 100 km distance between Madrid and a DR site?
Neither ISO/IEC 27001 nor EU DORA (Regulation (EU) 2022/2554) specifies a universal 100 km statutory figure—they require risk-based geographic separation sufficient to prevent a single localized hazard (utility grid failure, flood, metro fiber cut) from taking down primary and recovery operations simultaneously. Separating Madrid from Barcelona (~505 km straight-line) or Valencia (~300 km) easily satisfies independent power-grid and regional hazard isolation during ENS and DORA audits.
Q2
Why shouldn't I set my DNS TTL to 5 seconds for faster Spanish failover?
Extremely short TTLs (1–5 seconds) increase authoritative DNS query volume and lookup latency for every Spanish visitor, while many recursive ISP and enterprise resolvers silently clamp very low TTLs up to 30 or 60 seconds anyway. A 60-second TTL combined with a reverse proxy or CDN origin failover rule offers predictable propagation without hammering DNS resolvers.
Q3
Can I keep a smaller, cheaper server in Barcelona or Valencia as a warm standby for a larger Madrid primary?
Yes—many organizations run a degraded-capacity Warm Standby (for example, a 256 GB RAM standby backing up a 512 GB RAM Madrid primary) to cut recurring idle hardware bills, provided the standby has at least as much NVMe disk capacity as Madrid and enough memory to keep the core OLTP service running at reduced concurrency while Madrid is repaired. Document this degraded-capacity assumption explicitly in your SLA and BIA.
Q4
How do I protect my DR standby server from being encrypted simultaneously if Madrid is hit by ransomware?
Real-time replication faithfully copies ransomware-encrypted files or dropped SQL tables from Madrid to Barcelona within seconds. Always combine live Warm Standby replication with immutable ZFS snapshots on the standby (using a restricted zfs allow receive-only user that cannot execute zfs destroy over SSH) plus separate credential-isolated immutable backups (3-2-1-1-0 architecture) so you can roll back to a clean pre-infection snapshot.
Q5
What should I confirm with Onlive Server before ordering hardware for a Madrid multi-site DR architecture?
Confirm four items in writing with support: (1) whether Onlive Server offers bare-metal inventory in a second Spanish city or another EU location matching your residency requirements, (2) out-of-band IPMI/KVM availability for hard power-off fencing during split-brain emergencies, (3) BGP session support if you plan to announce your own RIPE /24 prefix across sites, and (4) bandwidth/port policies so continuous ZFS and database replication stays within your contracted port terms.



Ready to Architect Your Spanish Multi-City Continuity Plan on Madrid Bare Metal?

Build your high-availability primary infrastructure on enterprise Intel Xeon and AMD EPYC bare-metal servers hosted in our state-of-the-art Madrid facility. Explore configurations from DSX15 (Intel Xeon Silver 4116, 96GB RAM, 2x 1TB NVMe, $259/mo) to high-concurrency database powerhouses like DSX14 (EPYC 7662 64C, 512GB RAM, 2x 3.84TB NVMe, $305/mo) and DSX8 ($707/mo). Benefit from dedicated 1 Gbps to 10 Gbps unmetered ports and out-of-band IPMI remote management. Contact our engineering team today to review bandwidth clauses and design your secondary Iberian failover topology.

RP
Rishabh Pal
Principal Infrastructure & Disaster Recovery Architect
Specializing in mission-critical bare-metal clustering, multi-site failover engineering, OpenZFS replication topologies, and European financial compliance (ISO 22301, Spain ENS & EU DORA) for Onlive Server enterprise clients.