Back to all writing

A Backup Isn't Much Use If You Can't Restore It

IPMAT Series•Part 55•4 min read•By Mikhil

A Backup Isn't Much Use If You Can't Restore It

A folder full of question text can be quite reassuring until you try to open a question and realize that its diagram is missing.

Content Studio makes that a particularly interesting problem. An assessment may depend on a group of questions. The questions may depend on images, passages and subject definitions. The record of how those items were edited and reviewed has value of its own. Backing up the latest text is not the same as preserving the editor's working state.

During November I spent a surprising amount of development time on the possibility that the machine running the editor might lose that state.

Starting from nothing

The recovery work included portable copies that could be restored into an empty directory. That is a much more revealing experiment than restoring a file into the very project that produced it. If the original project is still available, a restoration can appear successful because it continues to use something that was never included in the backup.

A clean recovery test had to establish that the questions, assessments, media relationships and version history survived together. It also had to retain the newer learning-library material. The point was to recover an editorial environment, not merely generate an export of what had most recently been typed into it.

The tests exercised damaged copies too. An image with altered bytes, an incomplete checkpoint or a broken part of the recorded history should not be accepted simply because the file names still look familiar. The image tests were especially worthwhile because a file can have a plausible extension while containing something different from the format the editor expects.

There is a temptation to make restoration as forgiving as possible. But accepting an incomplete archive can be worse than refusing it. Once an incomplete library is declared healthy, the missing relationships may only become apparent when somebody tries to use a particular assessment.

What if the restore itself is interrupted?

One recovery experiment involved interruption during the restoration process. It checked that the previous state could be recovered rather than leaving the editor halfway between two versions of its own history.

The same question appears whenever software replaces something important. If the replacement fails halfway through, the original needs to remain distinguishable from the candidate. Otherwise, a second restoration attempt starts from a state that nobody intended to create.

I wanted recovery to be boring enough that it did not require guessing which copy of a library was usable. The tests checked refusal of damaged safety copies and recovery into clean working directories, as well as preservation of relationships between content records. They used temporary data, not an experiment in destroying my working library.

There was a related piece of work on maintenance and diagnostics during the month. I needed better ways to inspect the state of the system and investigate an apparent problem without immediately changing it. Knowing that an application has reported an error is different from knowing whether a repair is necessary. Inspection deserves to be a normal part of maintaining the software.

One important distinction is that restoring a private editorial checkpoint does not undo changes that have already been made on a hosted platform. Recovering the editor and correcting a published release are different jobs. The latter needs to account for what learners have already received and what should remain available to them.

The recovery exercises were performed locally. They provide evidence that the tested copies and restore behavior work under those conditions, not a certificate that every conceivable production incident is recoverable.

I find this whole subject rather satisfying. A backup feature can look complete when the application displays a successful export. Recovery is a much better test of the promise. It involves opening the library somewhere else and finding out whether the supposedly saved work is actually there.