Brief
Plan an isolated restore, verify the recovered data, and calculate RPO and RTO from a simple timeline.
Imani puts a post-crash report and an older archive in front of you. Voss claims the report never omitted a transfer. Mara asks for a repeatable demonstration in a separate practice lab before the fictional meeting. Do not change original databases or expose secrets. The urgency is part of the story; the exercise has no timer.
Your mission
- Put pg_dump, pg_restore --list, a separate database, pg_restore, and SQL verification in order.
- Name the two identifiers expected in the backup and the one absent from the report.
- Calculate scenario RPO and complete return from failure; compare them with 60- and 45-minute targets.
- Write a careful conclusion about what the difference between copy and report shows.
How to check your work
- Archive inspected and restored only to a practice destination.
- R1 and TRANSFER-7 recovered; TRANSFER-7 missing from report.
- RPO 30 min ≤ 60; full return 50 min > 45.
- The discrepancy is confirmed, but its cause and author remain unknown.
Course example
from datetime import datetime
def clock(value):
return datetime.strptime(value, "%H:%M")
backup_at = clock("20:50")
failure_at = clock("21:20")
restore_started = clock("21:30")
restore_verified = clock("22:10")
rpo_minutes = int((failure_at - backup_at).total_seconds() / 60)
restore_phase_minutes = int((restore_verified - restore_started).total_seconds() / 60)
rto_minutes = int((restore_verified - failure_at).total_seconds() / 60)
backup_events = {"R1", "TRANSFER-7"}
restored_events = {"R1", "TRANSFER-7"}
published_report = {"R1"}
print("RPO", rpo_minutes, "minutes")
print("restore_phase", restore_phase_minutes, "minutes")
print("RTO", rto_minutes, "minutes")
print("restored_matches_backup", restored_events == backup_events)
print("missing_from_report", sorted(restored_events - published_report))