Backup and Disaster Recovery Questions
Keeping data durable and recoverable when systems fail: backup design (full, incremental, differential, and snapshot strategies; point-in-time recovery), backup verification and restore testing, retention and archival policy (including compliance retention and legal holds), encryption and key management for backups, and disaster-recovery planning measured against recovery-time and recovery-point objectives (RTO/RPO). Tests whether a candidate can design a backup strategy that actually restores, choose the right retention tier for a business's downtime and data-loss tolerance, and operate backup systems safely under failure, compliance, and ransomware threats. Distinct from code-level fault-tolerance patterns (circuit breakers, retries, bulkheads) and multi-region failover architecture, which belong to high-availability-and-disaster-recovery.
Given a business tolerance of maximum 2 hours downtime and 1 hour data loss for core services, design a backup and disaster recovery (DR) policy. Define RTO and RPO for key services, replication strategy, failover automation, recovery testing cadence, and cost trade-offs.
Sample Answer
Direct answer
RTO (Recovery Time Objective, maximum acceptable downtime) and RPO (Recovery Point Objective, maximum acceptable data loss measured as time) for the core services map directly from the stated business tolerance: RTO <= 2 hours, RPO <= 1 hour. The useful next step is recognizing that not every service in the estate deserves that same investment. A reporting database that feeds executive dashboards is a good concrete example of a service that looks similar on paper but has a much looser real tolerance, and tiering the policy by actual business need, rather than applying the tightest tier everywhere, is what makes the cost trade-off defensible.
Structured elaboration
Defining RTO and RPO for key services. RTO is the wall-clock time from an outage starting to the service being usable again; the business's stated "maximum 2 hours downtime" becomes the RTO target for core services directly. RPO is the maximum span of committed data the business can afford to lose, measured backward from the moment of failure; "maximum 1 hour data loss" becomes the RPO target for core services directly. These targets apply to the core, revenue- or customer-facing services; not every service in the estate needs to meet them, which is the next point.
Tiering example, folding in the reporting-database case. Tier 1 (core, e.g. the primary transactional order database): RTO <= 2 hours, RPO <= 1 hour, per the stated business tolerance, requiring cross-region replication and automated failover. Tier 2 (example: a reporting database serving executive dashboards): a much looser target is legitimate here, because the data is derived from Tier 1 via a nightly ETL job (extract-transform-load, the scheduled job that pulls and reshapes data into the reporting database) and consumed by internal stakeholders who can tolerate a stale dashboard for a day. A reasonable Tier 2 target is RTO of roughly 24 hours and RPO of roughly 24 hours, matching the dashboard's own normal refresh cadence: "restoring" it really means rerunning the ETL job a bit early against the already-recovered Tier 1 database, not maintaining a separate cross-region replica for the reporting database itself. Note the RPO basis explicitly: it's bounded by the ETL's refresh interval, not by continuous replication, so promising a tighter RPO than the pipeline's own cadence would be meaningless without also increasing how often the pipeline runs.
Replication strategy. Tier 1: asynchronous cross-region log shipping (e.g. WAL, the write-ahead log), sized so typical replication lag stays well under the 1-hour RPO ceiling with margin; since real-world lag is usually seconds to low minutes, synchronous replication's write-latency cost isn't justified for a 1-hour target. Tier 2: no dedicated replication is needed at all; "replication" for the reporting database really means keeping its Tier 1 data source protected, plus keeping the ETL job's definition and schedule version-controlled so it can be rerun from anywhere.
Failover automation. Tier 1: automated health checks trigger promotion of a standby, repoint the client-facing endpoint, and run a smoke test, budgeted to sum to the 2-hour ceiling with an explicit buffer: detection roughly 15 minutes, promotion roughly 15 minutes, endpoint cutover and propagation roughly 30 minutes, validation roughly 30 minutes, buffer roughly 30 minutes, totaling 120 minutes exactly against the 2-hour target. Tier 2: a scripted but human-triggered rerun of the ETL job against the recovered Tier 1 primary is sufficient; full automation investment isn't justified given the looser RTO.
Recovery testing cadence. Tier 1: quarterly full DR game days, measuring real RTO and RPO against target end to end. Tier 2: semi-annual validation is sufficient, and is effectively re-exercised for free every time the ETL job is rerun ad hoc for any operational reason, given the lower business criticality.
Cost trade-offs, with a worked example. Tier 1's targets require paying for cross-region infrastructure continuously: a standby instance running around the clock, plus replication egress. If the Tier 1 database generates roughly 5 GB/hour of WAL and cross-region egress costs roughly $0.02/GB, monthly replication egress is roughly 5 GB/hr x 24 hr x 30 days x $0.02/GB = 3,600 GB x $0.02 = about $72/month (an illustrative estimate, not a real bill, meant to show the shape of the calculation). The reporting database's Tier 2 posture costs effectively nothing extra in dedicated DR infrastructure, since it has no dedicated replica; its only cost is the ETL job's normal query load, which it already pays regardless of DR posture. The general principle: DR spend should scale with each service's actual business tolerance, not be applied uniformly at the tightest tier's cost everywhere, or you end up paying continuous cross-region replication costs to protect data, like daily dashboard aggregates, that nobody actually needs back in under 24 hours.
Case study: A compliance workload requires 10-year retention and must be recoverable within 48 hours. Compare two approaches quantitatively and qualitatively: (A) keep replicated backup copies in two regions (higher ongoing storage/egress cost) vs (B) keep primary in lower-cost cold archive and perform on-demand restores to recover within 48 hours. What variables determine the better approach and how would you model costs and risk?
Sample Answer
Direct answer
Build a total-cost model over the same ten-year horizon for both approaches, using the same
dataset size on both sides, then find the break-even restore frequency at which the two costs are
equal. In a realistic model, keeping a cold archive copy and restoring on demand is dramatically
cheaper unless full-dataset restores happen roughly monthly or more often, which is far more often
than a genuine compliance archive is typically accessed. The variable that actually decides the
question is expected restore frequency, not raw storage price, though a hard regulatory
requirement for geographic redundancy can override the cost comparison entirely.
Quantitative model
Take an illustrative 8,000 GB (8 TB) compliance dataset, retained for 10 years, with a 48-hour
recovery requirement. All figures below are illustrative order-of-magnitude prices for
demonstrating the model, not live vendor pricing, and every step stays on the same basis: GB,
GB-month, and dollars per year, converted consistently.
Approach A: replicated copies in two regions, on a tier that supports near-immediate restore,
at an illustrative $0.01 per GB-month per region.
- Per region: 8,000 GB times $0.01 per GB-month is $80 per month.
- Two regions combined: $160 per month, or $1,920 per year, or $19,200 over 10 years.
- Plus a one-time cross-region seed transfer of roughly 8,000 GB at an illustrative $0.02 per GB
egress rate: about $160. - Total over 10 years: approximately $19,360.
Approach B: a single-region cold archive tier plus on-demand restores, at an illustrative
$0.001 per GB-month for storage and $0.02 per GB for a retrieval that still meets the 48-hour
target.
- Storage: 8,000 GB times $0.001 per GB-month is $8 per month, or $96 per year, or $960 over 10
years. - Retrieval: 8,000 GB times $0.02 per GB is $160 per full-dataset restore event.
Break-even. Setting the two ten-year totals equal: 960 plus 160 times N equals 19,360, so N
equals about 115 restore events over 10 years, roughly 11.5 per year, close to monthly. Below that
frequency, approach B is cheaper; above it, approach A is cheaper. At a more realistic frequency
for a legal-hold or audit archive, say 3 full-dataset restores across the entire 10-year hold,
approach B totals 960 plus 3 times 160, or $1,440, versus approach A's $19,360, roughly 13 times
cheaper.
Qualitative factors
- SLA margin, not just average cost. Archive tiers commonly offer a faster, pricier retrieval
option and a slower, cheaper one. For a 48-hour requirement, choose whichever tier's stated
retrieval window leaves real margin under 48 hours, not one whose window is itself close to 48
hours, since that leaves no time for locating the right data, transferring it, and validating it
before the deadline. - Regulatory mandates can override cost. Some compliance regimes require genuinely
geographically redundant, continuously available copies as a requirement in itself, independent
of how often the data is actually restored. Check whether that applies before running any cost
model; if it does, approach A may be mandated regardless of the comparison above. - Tail risk of a single archive copy. If approach B's single region is lost entirely before a
restore happens, and the archive tier does not itself provide independent geographic redundancy
beyond its own region, approach B carries more risk of total data loss than approach A's
two-region design. This risk does not show up in the average-cost model and has to be weighed
separately.
Variables that determine the better approach
Dataset size, retention duration, the price differential between the fast and cold tiers, expected
restore frequency over the retention horizon (the single largest lever, per the break-even
calculation), the archive tier's actual retrieval latency relative to the SLA's margin, and any
hard regulatory requirement for geographic redundancy that removes the choice from a pure cost
comparison.
How to model cost and risk
Compute storage cost as footprint in GB times price per GB-month times months retained, summed per
copy, and retrieval cost as expected number of restores times footprint times price per GB
retrieved, comparing both approaches over the identical retention horizon and dataset size so
nothing is compared across mismatched bases. Score the qualitative risks, SLA margin and single-copy
exposure, separately from the dollar figures, and check whether a hard compliance requirement
removes the choice before optimizing the remaining trade-off on cost alone.
Design a disaster recovery strategy for a transactional relational database requiring RPO < 1 minute and RTO < 15 minutes across regions. Describe replication method, failover procedure, data consistency considerations, and how to test DR with minimal production impact.
Sample Answer
Direct answer
RPO (Recovery Point Objective: the maximum data-loss window) under 1 minute is tight enough to change the design decision compared to a looser target: at this ceiling, asynchronous replication's typical seconds-level lag is often fine in practice, but it isn't a guaranteed bound, replication lag can spike well past a minute under load or a network hiccup with nothing stopping it. Meeting RPO < 1 minute as an actual guarantee, not just a usual outcome, points toward synchronous or quorum-based replication (the primary waits for acknowledgment from the standby, or from a quorum of standbys, before committing), accepting the added write latency that comes with it as the deliberate cost of the guarantee.
Structured elaboration
Replication method. Synchronous replication (e.g. Postgres synchronous_commit=on or remote_apply) gives RPO effectively zero for infrastructure failures, since no commit is acknowledged to the client until the standby has it, but adds the cross-region round-trip time (commonly tens to over a hundred milliseconds depending on the region pair) to every write, which can become a real throughput constraint under high transaction rates. Quorum-based replication (a write is acknowledged once a quorum, e.g. 2 of 3 regional replicas, has it, not all of them) gives the same strong guarantee while tolerating one slow or unreachable replica without stalling the primary. A well-monitored asynchronous setup, with alerting on lag well inside the 1-minute budget, is a real option only if the business explicitly accepts "usually under a minute, not contractually guaranteed under adverse conditions"; that trade-off should be surfaced explicitly rather than silently assumed away by picking async and hoping.
Failover procedure and RTO budget. Detection (confirmed failure, not a single blip): roughly 2 minutes. Promotion: roughly 3 minutes, faster than a looser-RPO design because a synchronous or quorum replica is, by construction, already caught up and doesn't need catch-up time before it's safe to promote. Traffic cutover: roughly 5 minutes, requiring a short DNS TTL (time-to-live, how long clients cache a DNS record before re-checking it) set in advance (e.g. 30 to 60 seconds) plus application-level reconnect/retry behavior that doesn't require a manual restart. Validation smoke test before declaring recovery: roughly 3 minutes. Summed: roughly 13 minutes, leaving about 2 minutes of margin under the 15-minute RTO (Recovery Time Objective: the maximum downtime) target, all figures illustrative and meant to be re-timed in a real drill, not asserted as guaranteed.
Data consistency considerations. With synchronous or quorum replication, the promoted standby is guaranteed consistent up to the last acknowledged commit, so failover requires no reconciliation, the biggest consistency advantage over asynchronous replication. The real risk with any replication mode is the old primary coming back online after failover with writes the new primary never received (a split-brain divergence): it has to be explicitly fenced (its ability to accept writes revoked) the moment failover is declared, and any writes it accepted after the split should be treated as lost or requiring manual reconciliation, not silently merged back in.
Testing DR with minimal production impact. Promote a replica into an isolated network segment for drills, not the live traffic path, so testing the mechanics of failover never touches real user traffic. Validate the promoted instance with synthetic or replayed read-only traffic, or a canary write workload against a namespaced test schema, rather than pointing real users at it. To test the cutover mechanism itself (DNS or routing changes) without customer impact, use a small canary percentage of traffic, or hit the DR region's endpoint directly with an internal synthetic client, bypassing the global router that serves real users, so the target environment is validated without touching what actually routes production. Time every phase of each drill against the 15-minute budget and update the runbook if any phase trends over its allotted share.
Define Recovery Time Objective (RTO) and Recovery Point Objective (RPO). Then give two practical examples mapping specific RTO and RPO values to backup types and frequencies: one for a small e-commerce transactional database, and one for a log or analytics pipeline where some data loss is acceptable.
Sample Answer
Direct answer
Recovery Time Objective (RTO) is the maximum acceptable length of time between a failure or data-loss event and the moment the affected system is back up and functioning normally: it answers "how long can we tolerate being down." Recovery Point Objective (RPO) is the maximum acceptable amount of data loss, measured as a span of time between the last valid recoverable state and the moment of failure: it answers "how much recent data can we afford to lose." Both are business decisions first (driven by what downtime or data loss actually costs the business) that then drive the technical backup design, not numbers an engineering team should invent unilaterally. Below are two worked examples that map specific RTO/RPO values to specific backup types and frequencies, one for a small, low-volume e-commerce transactional database, and one for a log or analytics pipeline where some data loss is tolerable.
Structured elaboration
Recovery Time Objective (RTO). Measured on the downtime axis. If a database goes down at 2:00pm and the RTO is 1 hour, the business has committed to being back online by 3:00pm at the latest. RTO is achieved through how fast you can restore or fail over, not through how often you back up.
Recovery Point Objective (RPO). Measured on the data-loss axis. If the last successful backup or log-shipment happened at 1:55pm and the database fails at 2:00pm, you've lost 5 minutes of writes: an RPO of 5 minutes means that gap is the maximum you've committed to tolerating. RPO is achieved through how frequently you capture recoverable state (backup cadence or continuous log shipping), not through restore speed.
Example 1: small e-commerce transactional database. Context: an online store taking live customer orders and payments continuously, at a modest volume, say roughly 200 orders/day on average (this is stated as a daily average for illustration; actual peak-hour order rate would be higher than this average implies, so treat it as a lower bound, not a worst case).
- RPO target: 5 minutes. Basis: 5 minutes is the maximum gap allowed between the last captured recoverable state and a failure. At the stated average order rate, a 5-minute gap risks under one order's worth of lost data on average (200 orders/day works out to about one order every 7 minutes on average, so a 5-minute window covers roughly 0.7 of that spacing), though an actual burst of orders arriving close together could lose more than the average implies, which the business judged acceptable to re-key or reconcile manually if it happens. Achieved via continuous transaction-log shipping (point-in-time recovery, PITR) capturing changes roughly every 5 minutes, layered on top of a daily full backup as the base to restore from.
- RTO target: 1 hour. Basis: 1 hour is the time from "database unreachable" to "store accepting orders again," achieved via an automated failover runbook: promote a standby replica in a separate availability zone, or restore the latest full backup and replay the shipped logs into a fresh instance, with connection-string or DNS cutover automated rather than done by hand under pressure.
Example 2: log or analytics pipeline (some data loss acceptable). Context: a pipeline ingesting application or clickstream logs into a warehouse used for internal dashboards and offline analysis, not customer-facing in real time.
- RPO target: 24 hours. Basis: 24 hours is the gap between the last completed nightly backup checkpoint and a failure. This is acceptable specifically because the upstream source (e.g. an event queue or a landing-zone object store) separately retains 7 days of raw events, so a lost day of processed warehouse data can be reprocessed from the untouched raw source rather than being permanently gone; the real cost of missing this RPO is a delay in reprocessing, not irreversible loss. Achieved via a nightly full or incremental backup of the warehouse tables; continuous log shipping isn't warranted here because the 24-hour RPO doesn't require it.
- RTO target: 8 business hours. Basis: this is measured in business hours within a single working day, not 8 calendar hours overnight, because dashboards are consulted during business hours and a pipeline down overnight causes no visible impact. Achieved via restoring the prior night's backup and re-running that day's batch ETL job once the source system is reachable again.
Why these numbers, and not others. Every value above is stated on a single, named basis: RPO is a time gap between capture events, RTO is a wall-clock duration to restored service, and the order-rate and retention figures used to justify them are explicitly labeled as averages or fixed-window retentions so they aren't mistaken for guarantees. The e-commerce example gets the tighter numbers on both axes because live revenue and payment records are on the line; the analytics example gets looser numbers on both because the underlying raw data is independently recoverable and the consumers are internal and delay-tolerant, not customer-facing.
Architect an enterprise backup and recovery solution for a hybrid environment with 10,000 VMs and 50 PB of data across on-prem NAS and public cloud object stores. Requirements: tiered RTO/RPO for multiple service tiers, global deduplication, encryption, immutable retention for 7 years, GDPR controls, and an automated quarterly restore test plan. Provide a high-level design, key components, data flow, and testing/automation strategy.
Sample Answer
Direct answer
A 10,000-VM, 50 PB hybrid backup and recovery solution has to be built around per-tier RTO/RPO commitments rather than one blanket target, a global deduplication fabric spanning both on-prem and cloud sources to make the storage cost tractable at that scale, encryption and immutability enforced together for the regulated long-term tier, and an explicit, engineered answer to the real tension between GDPR's right-to-erasure and immutable, deduplicated, shared retention, none of which resolve themselves by default.
Structured elaboration
Tiered RTO/RPO for multiple service tiers. Define distinct service tiers rather than one target for the whole 50 PB estate: for example a critical tier with an RTO around 1 hour and RPO around 15 minutes, a standard tier with an RTO of several hours and RPO around an hour, and an archival or cold tier with an RTO measured in a day or more and RPO around a day, each mapped to a different backup frequency, replication strategy, and storage class. A single blanket target across 10,000 heterogeneous VMs would either be wildly over-engineered and expensive for low-priority systems or dangerously insufficient for the genuinely critical ones.
Global deduplication. A shared deduplication fabric, using content-defined chunking and a global hash index, spans backups sourced from both on-prem NAS and cloud object stores, so identical data appearing across different VMs and sources (shared base operating-system images, common libraries, duplicated datasets) is stored once regardless of which side of the hybrid environment it originated from. At this scale, deduplication ratios in VM-heavy estates are commonly reported in the range of roughly 5 to 20 times, though the real ratio depends heavily on the specific workload mix and should be measured against this environment's actual data, not assumed from a general figure.
Encryption. Encrypt data both in transit, for any cross-site and cross-cloud replication, and at rest, across the chunk store and the metadata store, with a key-management system that rotates keys on a defined schedule while explicitly retaining historical key versions for the full length of the retention window; a rotated-and-destroyed key makes every backup encrypted under it permanently unreadable, a real, avoidable failure mode rather than a theoretical one.
Immutable retention for 7 years. For the regulatory long-term retention tier, back the retained copies with a genuine immutability mechanism, write-once/object-lock style enforcement, so that no operator mistake or compromised credential can delete or shorten that retention before the 7-year period elapses. This immutability guarantee has to be honored by the deduplication and garbage-collection logic too. In a dedup system, unique data is stored once as chunks; each backup's manifest lists which chunks it needs; and a reference count per chunk tracks how many manifests still point to it. Concretely: a chunk still referenced by an immutable-tier manifest must never be reclaimed (deleted by the cleanup process once nothing needs it), regardless of what reference counts on other, non-immutable tiers might otherwise suggest.
GDPR controls. GDPR's right to erasure sits in direct, structural tension with both 7-year immutable retention and with deduplication (a chunk shared across many tenants or data subjects can't simply be deleted to satisfy one subject's erasure request without affecting everyone else who shares it). The practical resolution most organizations use is twofold: encrypt each tenant's or data subject's data under its own distinct key, so that destroying the key ("crypto-shredding") renders that data permanently unreadable without needing to physically delete shared, deduplicated bytes that other tenants still legitimately reference; and maintain a clear, documented policy establishing backup retention as a defined, time-boxed, legitimate purpose, since most data-protection frameworks including GDPR recognize backup retention as an accepted exception, but only when the organization has actually documented and can point to that policy, not left it unaddressed.
Restore orchestration, testing, and automation strategy. An automated restore-testing pipeline, the same underlying shape as a continuous backup-verification pipeline scaled to enterprise scope, runs a scheduled sample every quarter across the fleet: full coverage (100%) of the critical tier every quarter given its small size and outsized importance, and a statistically representative, rotating sample of the standard and archival tiers, structured so that full coverage of the entire fleet completes within a bounded, multi-quarter cycle rather than never actually happening for the lower tiers. Each test performs a real restore into an isolated environment, validates at the application level, and reports results automatically to a dashboard, opening a ticket on any failure rather than requiring a human to notice.
High-level design, key components, and data flow. Putting the pieces above together into one pipeline: lightweight ingestion agents run on each VM and against each NAS source, performing source-side content-defined chunking and deduplication before anything crosses the network; chunks flow over encrypted transport into a tiered chunk store spanning hot, warm, cold, and archive classes across both on-prem and cloud capacity; a separate, globally-sharded metadata and index store tracks chunk hashes, reference counts, and per-backup manifests, and is what every ingest and restore operation actually queries; a lifecycle manager sits above both stores enforcing tiering transitions, WORM immutability on the regulated tier, and per-tenant key scoping for GDPR; a restore orchestrator handles the time-budgeted, parallel-fan-out restore sequence for any given service's RTO tier; and the automated test harness described above continuously exercises that same restore orchestrator against real, isolated targets rather than sitting off to the side as a separate, disconnected system.
Worked example
For the critical tier, comprising roughly 500 of the 10,000 VMs running the organization's core transactional services, the quarterly test plan restores all 500 into an isolated environment each quarter and validates application-level health on each. For the remaining 9,500 standard and archival VMs, the plan rotates a sample of roughly 800 per quarter, weighted toward VMs that haven't been tested in the longest time, so that over a roughly 12-quarter (3-year) cycle, every VM in the fleet has been genuinely restore-tested at least once, a concrete, auditable coverage guarantee rather than an assumption that sampling alone is "probably fine." A specific tenant's erasure request under GDPR is handled by destroying that tenant's dedicated encryption key rather than attempting to physically delete their data out of shared, deduplicated storage; because their data was encrypted separately from other tenants' data specifically to make this possible, the erasure completes without touching a single byte that other tenants' backups still legitimately reference.
Trade-offs and pitfalls
- Per-tenant or per-subject encryption keys reduce the deduplication benefit somewhat, since identical raw content encrypted under different keys no longer produces identical stored bytes across tenants, a real, deliberate cost accepted specifically because it's what makes GDPR-compliant erasure practical without breaking shared, deduplicated storage for everyone else.
- A dedup ratio assumed from a general industry figure rather than measured against this specific environment's actual workload mix can make the entire storage cost model wrong by a large margin; the estimate belongs in initial planning, but the actual ratio needs to be measured early and the cost model corrected against reality.
- Applying the 1-hour critical-tier RTO commitment as if it meant "restore all 500 critical VMs simultaneously within an hour" rather than "restore any single critical VM's own footprint within an hour" is the same basis error that would appear in a smaller single-service design; a fleet-wide simultaneous-disaster scenario needs its own explicitly stated, and likely different, target.
Unlock Full Question Bank
Get access to all 11 Backup and Disaster Recovery interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.