Risk and resilience × Databases
Business lens: Risk and resilience · Technology lens: Databases
Reading scope: Original bounded recovery teaching; independently unvalidated.
Recovery is a question about meaning and state
A database organises records and their relationships so applications can retrieve and change them. Recovery must restore a state whose meaning the business understands. Being able to open a database file is a necessary technical observation in many exercises, but it does not establish that all orders, balances or permissions are correct. Begin with the business records required for a bounded service and identify their owners. State which consistency conditions matter: an order should reference a valid customer, its lines should reconcile to the intended total, and its processing status should correspond to actual fulfilment. A backup becomes useful through tested restoration and acceptance evidence.
Choose a consistent backup method
A database can change while a copy is being made. The official SQLite backup documentation explains its online backup mechanism and the concerns associated with simply copying a live database file. Python also documents a backup method on its SQLite connection. Those references concern particular software behaviour, not an organisation's complete recovery policy. In a learner exercise, use a supported database backup interface and keep the source and destination distinct. Write down the environment and the point represented by the copied state. Do not generalise SQLite instructions to every database engine or assume that copying an application directory creates a complete usable recovery package.
Worked recovery-point and recovery-time example
Consider a fictional ledger with a consistent backup at 09:00 and a disruption at 09:18. Six orders are committed during that eighteen-minute interval. A restore exercise produces a database that passes the specified acceptance checks at 09:45. The restored state is eighteen minutes behind the disruption point, and the service recovery interval is twenty-seven minutes. The six later orders need investigation and authorised reconciliation; their absence from this particular backup does not prove that no other evidence survives. Against a stipulated ten-minute maximum data-age objective, the snapshot misses that objective by eight minutes. Against a thirty-minute recovery-time objective, the twenty-seven-minute result is three minutes inside the limit.
Do not replay uncertain transactions blindly
An external payment, supplier acknowledgement or dispatched parcel may survive even when the local database loses its latest state. Repeating every missing row can therefore repeat a real-world action. Build a reconciliation table using a stable transaction identifier, available external evidence, restored database status and an owner-approved next step. Finance examines payment evidence, operations examines fulfilment and IT explains what the restored snapshot contains. Customer service needs an agreed explanation for uncertain cases. An unresolved item should remain visibly unresolved until evidence supports its disposition. A recovered row is not the same thing as a recovered business event, especially across organisational boundaries.
Use the existing backup lesson deliberately
The linked backup-and-restore lesson is the practical starting point. Before running its instructions, identify the synthetic dataset, expected baseline and permitted local changes. After restoration, inspect record counts and relevant constraints, then compare the particular records needed by the business acceptance checklist. Counting rows alone can miss incorrect values or broken relationships. Add a correction case with one duplicated order identifier and explain which check would expose it. Keep a separate exercise log for commands actually run, observed results and proposed steps. This reading adds a worked business interpretation to the existing lesson; it does not create a new catalogue lab or claim that your production records have been restored.
Govern retention, access and future improvement
Recovery copies may contain sensitive information and may outlive the system that created them. Assign ownership for access, retention and deletion decisions, and verify applicable requirements separately when dealing with real records. For the synthetic exercise, specify where the copy is stored, who may use it and when it can be discarded. Compare two improvements: more frequent consistent backups and better transaction reconciliation evidence. They address different problems and impose different costs. A frequent backup may reduce data age while leaving cross-system uncertainty untouched. A better reconciliation process may clarify those events without shortening the technical restoration interval. Explain that distinction before choosing the next investment.
Question words and progressive study
Who accepts the restored ledger? Whom does an uncertain order affect? Whose external evidence authorises reconciliation? What state does the backup represent? Where is the restored copy isolated? When were the latest recoverable records committed? Why is row count insufficient? Which transactions must not be replayed automatically? How are retention and access reviewed? Foundation study distinguishes copying, restoring and accepting. Undergraduate study computes the two time intervals and tests relationships in synthetic records. Postgraduate study compares backup frequency, reconciliation cost and cross-system failure cases. Research study defines a reproducible simulated recovery experiment with fixed inputs, acceptance criteria and explicit exclusions. The exercise cannot demonstrate legal compliance or general disaster readiness.
Study questions and answers
Calculate the data-age and service-recovery intervals.
Data age is 09:18 minus 09:00 = 18 minutes. Recovery interval is 09:45 minus 09:18 = 27 minutes. These are different clocks.
Marking guide: Credit eighteen-minute data age and twenty-seven-minute recovery interval; retain their different start/end times.
Evaluate the two stipulated objectives.
The 10-minute data-age objective is missed by 8 minutes. The 30-minute recovery-time objective is met with 3 minutes to spare.
Marking guide: Credit eight-minute data-age miss and three-minute recovery-time spare against separate objectives.
Why not replay all six missing orders immediately?
An external action may already have completed. Reconcile stable identifiers and surviving payment or fulfilment evidence before authorised replay.
Marking guide: Before replaying six orders reconcile external payment/fulfilment evidence and identifiers; replay requires authorisation.
Practice task
Run the existing synthetic backup lesson, record actual commands and checks, then add the fictional recovery timeline and a six-order reconciliation worksheet without contacting external systems.
Practice bridge
- Run the existing synthetic backup lesson, record actual commands and checks, then add the fictional recovery timeline and a six-order reconciliation worksheet without contacting external systems.
- Distinguish the fictional timeline from commands and results actually observed in the existing lesson.
Boundary: Existing guided lesson and a fictional worked timeline, not a new runnable fixture or production recovery.
Sources and further reading
- SQLite: Online Backup API
Scope: Selected SQLite backup-method background; no production or organisation-wide assurance. - Python: sqlite3 documentation
Scope: Selected connection backup background; learner must check their Python version.