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.
Your primary cloud region experiences a catastrophic outage that corrupts the primary metadata store for the data lake. Walk through a detailed recovery plan to restore data availability and integrity across analytics clusters, including verification steps, timelines, coordination with stakeholders, and how you'd prevent reoccurrence.
Sample Answer
Direct answer
The first thing to establish, before any restore action, is whether the raw data itself was actually lost or just the metadata catalog that points to it, because in most data lake architectures the two live in genuinely separate systems with different durability properties: raw data typically sits in durable, often multi-region object storage, while the metadata store (a Hive Metastore, a service that maps table and partition names to their physical file locations in storage, a table-format transaction log, or similar) is frequently a separate, sometimes less-replicated service. If the raw files survived, this is a metadata-restore-and-reconciliation problem, materially faster and lower-risk than actually reconstructing lost data, and the recovery plan should confirm that distinction first rather than assuming the worse case.
Structured elaboration
Recovery plan.
- Verify raw data integrity independently of the metadata layer: spot-check object storage for the underlying data files and partitions against checksums or a manifest, confirming what actually exists before touching the catalog at all.
- Restore the metadata store from its own backup into a new, isolated instance in a healthy region, rather than attempting an in-place repair on infrastructure that may itself be compromised.
- Reconcile the restored catalog against the actual state of object storage: the catalog's backup is likely slightly stale relative to what was truly written before the outage, so run a reconciliation or repair scan (most lake table formats support a metadata-refresh operation that re-scans partitions in storage and re-registers them) to close any gap, rather than assuming the restored catalog and the real storage state already agree.
- Repoint analytics clusters at the restored metadata endpoint, refresh or restart their cached catalog connections, and run smoke queries against known tables before declaring the service restored.
Verification steps. Row-count and partition-count checks on a sample of critical tables against pre-incident baselines, if monitoring captured any. Confirm the reconciliation scan found no orphaned partitions (data present in storage but missing from the catalog) or dangling entries (registered in the catalog but missing from storage). Run the existing scheduled analytics jobs and dashboards end to end as a real-world validation, checking output shape and volume against expectations, not just that the jobs completed without error.
Timelines (illustrative, to be re-measured against the real lake's scale, not asserted as fixed). Raw-data integrity check: roughly 30 minutes. Metadata restore: roughly 30 to 60 minutes, depending on catalog size. Reconciliation scan: roughly 1 to 3 hours, the phase most sensitive to lake size, since a lake with millions of partitions takes meaningfully longer to reconcile than a small one, so this is the phase to size against actual partition count rather than assume constant, and the first place to invest in parallelizing if the recovery doesn't meet the business's RTO. Cluster repoint and smoke validation: roughly 30 minutes. Total order of magnitude: a few hours for a moderately sized lake, dominated by the reconciliation scan at larger scale.
Coordination with stakeholders. Data platform and on-call engineering drive the recovery itself. Downstream analytics and BI consumers need early notice that outputs may be delayed or stale, and should be told explicitly to hold off trusting dashboards until the recovery is formally declared verified, not just "clusters back online." Leadership or an incident commander should be looped in for an incident of this severity, and if any customer-facing derived data was affected, whoever owns customer communication needs to be brought in as well.
Preventing reoccurrence. Replicate the metadata store itself cross-region, so it isn't a single-region point of failure sitting underneath data that's already durable and multi-region; if the metastore technology doesn't support replication, increase its own backup frequency instead. Add automated, scheduled reconciliation scans that run continuously, not only during an incident, so catalog-to-storage drift is caught and fixed before it can compound into a catastrophic surprise. Document this exact runbook, including the timeline breakdown above, so the next occurrence is executed from a tested procedure rather than improvised from scratch under pressure again.
You inherit a data engineering team with no documented backup or retention policies for critical datasets. Describe the first five actions you'd take in the first week to assess risk and improve backup coverage, including stakeholders you would engage and immediate mitigation steps.
Sample Answer
Direct answer
With zero documented backup or retention policy, the first week isn't about designing the final policy, it's about finding out what's actually at risk right now and stopping the worst of the bleeding cheaply while the real design gets built with stakeholder input. Five concrete actions: inventory what exists, risk-rank the gaps, apply cheap immediate mitigation to the worst gaps, engage the right stakeholders to learn real tolerance, and draft (not finalize) a policy proposal by end of week.
Structured elaboration
- Inventory everything. Enumerate every dataset and system in scope, not just the ones assumed to be important, and for each record: owner, storage location, current backup state (none, partial, or full, including any accidental backup like storage versioning that happens to be enabled by default), rough size, and an initial, still-rough criticality guess. This produces a single source of truth to work from instead of relying on institutional memory about "what's probably backed up."
- Risk-rank the gaps. Cross the inventory against "what would hurt most if lost right now, with zero warning." Flag anything that is both business-critical and has zero backup as a Day-1 emergency, distinct from lower-priority gaps that can wait for the full policy design.
- Apply immediate, cheap mitigation to the worst gaps. For each Day-1 emergency dataset, put an imperfect stopgap in place fast rather than waiting for a proper strategy: enable native storage versioning or snapshotting if the platform offers it at no meaningful cost, or run a manual one-off export to a separate location. The goal is only to stop the bleeding while the real design is built, not to be the final answer.
- Engage stakeholders. Talk to the actual owners of each critical dataset (they usually already know their real pain tolerance, even if it was never written down), for example finance for billing data or the ML team for training data, to learn real RTO/RPO tolerance (RTO: how long that data's owner can accept being without it; RPO: how much recent data they can accept losing) rather than guessing it. Engage whoever controls infrastructure budget, since real backup infrastructure costs money and needs sign-off. Engage compliance or legal if any datasets carry mandated retention requirements (e.g. financial or personal data with a legal retention period), since regulatory obligation is often a more urgent forcing function for the policy than general best practice.
- Draft a policy proposal, explicitly framed as a draft. By end of week one, propose target tiers (e.g. critical, standard, low), draft RPO/RTO ranges per tier grounded in what stakeholders actually said in step 4, and a rough implementation timeline, presented for review and sign-off, not dictated unilaterally, since a real policy needs buy-in from the people whose data and budget it affects.
The common thread across all five: cheap, reversible action now for the worst-exposed data, paired with real information-gathering, rather than either doing nothing while a perfect policy gets designed, or over-engineering a stopgap that should really be temporary.
Design a highly available PostgreSQL-based OLTP architecture on AWS with a 99.99% availability target. Would you reach for RDS Multi-AZ or Aurora, and why? Walk through the rest of your design and how each choice trades off against RTO/RPO and cost.
Sample Answer
Direct answer
Both RDS Multi-AZ and Aurora give synchronous, multi-AZ data durability with an RPO (Recovery Point Objective, maximum acceptable data loss) effectively at zero for infrastructure failures within a region, so the 99.99% availability target is achievable with either. The differentiator is failover speed and cross-region disaster recovery: Aurora's storage layer is already replicated across AZs independently of how many compute replicas you run, which typically makes its failover faster than RDS Multi-AZ's, and Aurora Global Database gives materially tighter cross-region RPO than a standard RDS cross-region read replica, at a real added cost. Neither option, on its own, protects against a bad write or a human error like an unqualified DELETE, since synchronous replication faithfully replicates mistakes just as reliably as it replicates good writes; that's what point-in-time recovery (PITR) is separately for.
Structured elaboration
RDS Multi-AZ. A standard managed Postgres instance with a synchronous physical standby in a second AZ (Availability Zone: an independent data center within the same region) in the same region. Failover is automatic on primary failure, typically completing in roughly one to two minutes per AWS's own documentation (a vendor-reported figure, not independently measured here, and worth treating as approximate), via a DNS endpoint flip to the new primary. RPO is effectively zero for AZ-level or instance-level failures, since the standby only acknowledges synchronously. This covers AZ and instance failure within one region; it does not cover a full regional outage or a logical error, both of which need a separate mechanism: automated backups plus continuous WAL (write-ahead log) archiving to object storage for PITR, and optionally an asynchronous cross-region read replica that can be promoted for regional DR, with RPO in that case bounded by replica lag rather than zero.
Aurora. A Postgres-compatible managed service where the underlying storage layer is itself distributed and replicated across multiple AZs (commonly reported as 6 copies across 3 AZs) independent of how many compute instances are provisioned, so a single Aurora instance already has multi-AZ storage durability built in. Failover to an Aurora Replica, where one exists, is typically faster than RDS Multi-AZ's, often reported in the tens of seconds, because the new primary doesn't need to redo as much work on promotion, the storage layer is already shared and current (again a vendor-reported figure, flagged as such rather than personally benchmarked). RPO for AZ-level failure is effectively zero for the same reason. Aurora Global Database extends this with asynchronous cross-region replication, commonly reported at sub-second to low-single-digit-second lag, materially tighter than a standard RDS cross-region replica's typical lag (also vendor-reported, not independently verified here).
Recommendation and the RTO/RPO/cost trade-off. If the 99.99% target is purely about tolerating an AZ-level failure within one region, plain RDS Multi-AZ is the more cost-effective choice: it clears that bar with a simpler pricing model (roughly instance-plus-storage cost doubled for the standby) and doesn't require paying for Aurora's more sophisticated storage layer or a Global Database second region you may not need. If regional disaster recovery is also a genuine requirement, worth calling out as a distinct requirement from the AZ-level 99.99% figure, not something automatically implied by it, Aurora Global Database earns its added cost through a materially tighter cross-region RPO than a standard RDS cross-region replica provides.
The rest of the design. Layer PITR on top of whichever option is chosen: both support continuous backup to object storage with restore to any specific second within the retention window (commonly up to 35 days), which is the actual safety net for logical or human error, something no amount of synchronous replication provides. Run periodic DR drills that promote a cross-region replica into an isolated network and validate the real, measured regional RTO and RPO against target, the same rehearsal discipline any DR design needs, rather than trusting the vendor-documented failover numbers without ever having exercised them for real.
Propose a backup and recovery strategy for a high-throughput OLTP database that needs to minimize both RPO and RTO while staying cost-effective. How would your approach need to adapt while a major schema migration is in flight?
Sample Answer
Direct answer
For a high-throughput OLTP (Online Transaction Processing) database, the baseline design is continuous log shipping to a warm standby for RTO (Recovery Time Objective, the downtime target), plus periodic base backups sized so worst-case log replay stays bounded, for cost-effective RPO (Recovery Point Objective, the data-loss-window target). The part that's specific to this question is what changes during a schema migration: the migration itself temporarily changes both the write volume feeding your logs and the risk profile of what a restore actually recovers you into, and the strategy has to adapt on both counts, not just keep running unchanged.
Structured elaboration
Baseline strategy. Continuous transaction-log shipping (e.g. WAL, the write-ahead log) to a standby, asynchronous by default since it avoids the write-latency tax of synchronous replication and is cost-effective unless RPO needs to be near-zero, plus periodic base backups (e.g. daily) that bound how much log has to be replayed in a cold-restore fallback, using the same worst-case-replay reasoning. For a high-throughput system specifically, the WAL volume itself is large, so keep the cost-effective posture by compressing archived logs, tiering older log segments (past the near-term point-in-time recovery window but still inside the compliance retention period) to cheaper storage, and setting the fine-grained recovery window deliberately short (e.g. 7 days) rather than keeping every log segment at full fidelity indefinitely.
How the approach adapts during a schema migration.
- Backups taken mid-migration can capture the database in a transitional state, for example a new column half-populated by a backfill job, or dual-write logic active between an old and new schema. A point-in-time restore to a moment inside that window can put the database into a state the currently deployed application code doesn't actually handle correctly, if the app has already moved past assuming the migration finished. So: take an explicit, clearly labeled backup immediately before starting the migration as a clean rollback point, and treat any restore target that falls inside the migration window with extra caution, verifying which application version was actually live at that data version before trusting the restore.
- A long-running online migration (e.g. backfilling a large table without locking it) generates a large, temporary burst of extra log volume, since the backfill is itself a heavy write workload. That has two effects: it temporarily raises log storage cost for the duration of the window, and it can push replication lag up, since the standby has to apply the same burst. Either throttle the backfill's write rate to stay within the standby's apply capacity, or explicitly accept and communicate a temporarily wider RPO during the migration window rather than being surprised by it later.
- Test the restore and rollback path for the migration specifically, as part of migration planning, not as generic backup hygiene run separately: rehearse restoring to the pre-migration snapshot and confirm the pre-migration application version actually runs correctly against it, as a required step in the migration's own runbook, not an afterthought.
The general principle: a schema migration is a temporary, known-risk event that the ongoing backup and DR posture should explicitly account for, with a deliberate pre-migration checkpoint and a tested rollback path, rather than assuming the steady-state backup design covers it automatically.
Design a backup and point-in-time recovery strategy for a cloud data warehouse (Snowflake or BigQuery) that retains 3 years of history but must support restoring any dataset to a point in the last 7 days, within a 2-hour recovery window. Walk through how your approach hits that recovery-time target without keeping 3 years of full snapshots.
Sample Answer
Direct answer
The requirement bundles three genuinely separate axes that must not be conflated: retention (3 years, how far back data must be kept at all), PITR granularity (7 days, how far back you can restore to any specific moment), and RTO (2 hours, how long the restore operation itself may take). Confusing them is exactly the kind of same-basis error to avoid here, 3 years of retention does not mean restores from 3 years ago must complete in 2 hours (the 2-hour RTO is scoped to the 7-day PITR window), and a 7-day PITR window does not mean data older than 7 days is deleted, it's still retained, just at coarser granularity. The mechanism that satisfies all three without keeping 3 years of full snapshots is the warehouse's native copy-on-write time-travel or table-history feature, which is inherently incremental, only changed data is retained beyond its original state, not full periodic copies, for both the fine-grained 7-day window and the coarser long-tail retention.
Structured elaboration
The 7-day fine-grained PITR window. Use the warehouse's native continuous change-tracking capability (e.g. Snowflake's Time Travel feature, or BigQuery's table snapshot/time-travel capability), which retains the ability to query or restore to any past moment within a configurable window without taking discrete daily full snapshots. The underlying mechanism is a form of copy-on-write, retained versions of the changed data (Snowflake's micro-partition versioning) or retained table history (BigQuery), where only what actually changed is kept beyond its original state. Set the retention window parameter to at least 7 days for any dataset carrying this SLA (Service Level Agreement).
Retention out to 3 years, without full periodic copies. Native time-travel windows typically aren't extended out to 3 years, both for cost reasons and because the requirement doesn't actually need point-level granularity that far back, only the last 7 days need that. For the long tail beyond 7 days, take periodic (e.g. daily or weekly) logical snapshots or clones, or scheduled exports to cheaper columnar storage, at coarser granularity (restorable to a given day, not a given moment) for anything older than 7 days. Critically, the warehouse's native cloning or snapshot feature is itself typically metadata-based and copy-on-write, so even daily snapshots retained for 3 years don't cost anywhere near "3 years times full warehouse size" in storage, since unchanged data is shared across snapshots rather than duplicated. Both halves of the requirement, the 7-day window and the 3-year long tail, rely on the same incremental, copy-on-write principle rather than on literal repeated full copies.
Meeting the 2-hour RTO. Restoring via native time-travel or clone within the 7-day window is typically a largely metadata-driven operation, repointing table versions or creating a clone, rather than physically copying terabytes of data, so actual restore time for even a large dataset is usually well under 2 hours, often minutes. The 2-hour budget is generous precisely because this restore mechanism is metadata-driven, not because 2 hours of physical data movement is actually required. To make the contrast concrete: if the same requirement were instead met with literal periodic full-copy snapshots, a 50 TB warehouse would need at least 50,000 GB / (2 hours x 3,600 s/hr) ≈ 6.9 GB/s of sustained restore throughput to complete a full-copy restore within 2 hours, an expensive and fragile bar to hit reliably, versus a metadata-based restore whose time doesn't scale with warehouse size at all. That contrast is the direct answer to "without keeping 3 years of full snapshots": the naive full-snapshot approach is exactly what this metadata-driven mechanism avoids.
Validation. Periodically, e.g. monthly, actually restore a real dataset from within the 7-day window and time it against the 2-hour target, and separately test that the long-tail path (beyond 7 days, out to 3 years) also produces correct data, since it uses different tooling and granularity and is exercised far less often than the fine-grained path.
Unlock Full Question Bank
Get access to all 6 Backup and Disaster Recovery interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.