Reliability

Restore Drills That Prove Useful Recovery

Verify an isolated restore against structural checks and application meaning, then record the actual recovery boundary.

On this page
  1. Record what the backup represents
  2. Establish an isolation boundary
  3. Check structure and meaning separately
  4. Measure the actual recovery window
  5. Include a controlled failure
  6. Close the exercise deliberately

A backup is an input to a recovery procedure. Its existence does not show that the application can use it. A file can be readable and still lack required records, reference the wrong configuration, or belong to a version that the current program cannot open. A restore drill is useful when it tests those boundaries in an isolated place and leaves evidence about the result.

Start with a narrow objective: recover a disposable copy of a small service database and run a read-only application check against it. Do not point the drill at live data paths, production queues or outbound delivery credentials. The exercise should improve understanding without quietly becoming an attempt to replace the running service.

Record what the backup represents

Capture the artifact checksum, creation time, source identity and backup method. Also record the application and schema versions expected to read it. The backup's filename may include a date, but that date alone does not establish the last committed application event it contains.

For a live SQLite database, use a supported backup mechanism rather than copying only its main file while writes are continuing. SQLite's online backup API provides a way to create a consistent destination database. The exact invocation depends on the application or backup tool using that API.

A stopped database copied under a properly controlled procedure is a different case. State the stopping and consistency assumptions explicitly. Avoid turning a valid instruction for an offline fixture into a recommendation to copy arbitrary live database files.

Establish an isolation boundary

Create a new working directory owned by the drill account. Resolve the paths and verify that the destination differs from every live application directory. Copy the backup into that workspace and retain the original artifact unchanged. A mistaken destination is a reason to stop before opening the database for any write.

Start the application with outbound delivery disabled and with the restored database selected explicitly. Do not reuse a production environment file merely because it is convenient. It may contain queue credentials, callback addresses or a storage path that reconnects the drill to the running system.

If the application cannot disable side effects, restrict the drill to offline structural and query checks until an isolated application mode exists. A missing isolation facility is an engineering finding, not something to bypass in order to mark the drill complete.

Check structure and meaning separately

SQLite structural and reference checks can be run against a read-only connection to the disposable copy:

PRAGMA integrity_check;
PRAGMA foreign_key_check;

The first should report ok, and the second should produce no violation rows for a valid reference set. These checks answer database questions. They do not verify that the business state is the intended one.

Add small application assertions. For a task ledger, check that a known fixture task exists, that its status is permitted, and that its revision matches the recorded backup boundary. For a publication, verify an article's title and body, not only the total row count. Two different datasets can have the same number of rows.

Use bounded, non-sensitive evidence. Record identifiers from a deliberately prepared fixture instead of exporting real user records into a public drill report. A recovery procedure should not create a second uncontrolled copy of confidential data through its logs.

Measure the actual recovery window

Measure elapsed time from the agreed starting condition to the useful application check. Include artifact retrieval if retrieval is part of the expected incident procedure. Excluding a long download may produce an attractive timing that does not describe the work an operator would actually perform.

Record the latest recoverable event and compare it with the source boundary known for the exercise. That gives evidence about possible lost work. Do not derive the recovery point solely from the backup file's modification time; it can change when the file is transferred.

These measurements describe this drill, its dataset and its environment. They are not an availability promise. A larger database, slower storage or a missing decryption key can change the result substantially.

Include a controlled failure

Test an intentionally invalid copy, such as a missing required fixture record, while preserving the original backup. The verification procedure should stop and report the failed assertion. If the same success message appears for valid and invalid copies, the drill is testing command execution rather than recovery.

Also test the case where the artifact cannot be retrieved. A clear unavailable result is preferable to restoring an older local file without acknowledging the changed recovery boundary. Any fallback artifact needs its own identity and verification.

Close the exercise deliberately

Stop the isolated application, remove temporary credentials and delete disposable restored copies according to the agreed data retention rule. Keep the small report: artifact identity, tool versions, assertions, measured intervals, failures and cleanup outcome.

Turn findings into concrete changes. An undocumented encryption key location, an incompatible schema or a hidden outbound callback each deserves a repair to the recovery path. The drill earns its value by making these dependencies visible before they are needed under pressure.