Encrypted Backups: The Restore Drill Is the Product

Backups are usually evaluated by whether the job completed. That criterion measures the wrong thing: a job can complete successfully and produce an archive that cannot be restored, because the key was rotated without re-encrypting, the metadata was stored elsewhere, or the tool version that wrote the archive is no longer installed.

The short version: restore on a schedule, into a clean environment, using only what the backup contains plus the documented key material. Anything the drill needs that the backup does not contain is a gap the backup has.

What “restore” means for an encrypted archive

Three layers have to come back: the ciphertext, the key material, and the knowledge of how the archive was structured. Encryption adds a fourth risk — the key may be intact while the tooling that applies it is gone — and this risk is invisible in a backup dashboard that only reports bytes written.

So a restore drill has to include the decryption step performed on a machine that is not the one that made the backup, with the key obtained the way an operator would obtain it in an emergency, which is usually from a safe or a password manager rather than from the backup server’s own key store.

Key custody that matches the threat

Encrypting backups with a key stored beside them protects against theft of the storage medium and nothing else. Encrypting with a key stored only in an operator’s memory protects against theft and loses everything when that operator leaves.

The workable middle is a key stored in a separate system with its own access control and its own backup, plus a sealed copy held offline for the case where that system is the thing that failed. Both must be reachable by at least two people, because a single holder is an outage waiting for a holiday.

Rotation without losing history

Rotating the backup key is routine until an old archive needs restoring. Either re-encrypt the archive at rotation, which costs time and I/O, or keep the retired keys in escrow, mapped to the archives they open. The mapping is the important artefact: a safe full of unlabelled keys is worth nothing during a restore.

Write the mapping down in the same place as the retention policy, with dates, and keep it current. The question that arrives during an incident is “which key opens the archive from March”, and the answer must be a lookup rather than an investigation.

Restore time is a specification

Recovery time objectives are usually stated in hours and measured in guesses. Measure it: restore the largest realistic dataset and record the elapsed time, including decryption and verification. The number is frequently several times the assumption, and it is the number the business continuity plan should contain.

Then measure the incremental case: restoring a single file from inside the archive. Full restores are rare; single-file restores are common, and an archive format that requires a full restore to reach one file turns a five-minute request into a day of work.

Verification after restore

A restore that produced files is not a restore that produced the right files. Compare counts, compare checksums for a sample, and open the application that owns the data. For databases, run consistency checks rather than merely starting the service, because a database that starts with an inconsistent index is a database that will fail later in a way that looks unrelated.

Record the result of every drill with a date and the operator’s name. The record is what turns a claim about backups into evidence, and it is the first thing an auditor asks for.

Immutability and the deletion case

Ransomware targets backups first, because a backup is the thing that makes the attack survivable. An encrypted archive on a writable share is a target; the same archive on write-once storage or in an append-only repository is not. Encryption protects confidentiality, not availability, and the two are separate properties that need separate controls.

Also test the deletion case: restore a file that was deleted a month ago rather than yesterday. Long-retention restores exercise the older keys and the older tooling, which is where the gaps live.

The archive format ages

Tooling disappears faster than data. A backup written by a utility that is no longer maintained is a backup that requires archaeology. Prefer formats that are documented and readable by generic tools, and keep the writer’s version recorded next to the archive so a future restore knows what produced it.

Store a small verification note with each archive: what it contains, which key opens it, what produced it, and the command that restored it successfully last time. That note is worth more than the extra parity block.

Who runs the drill

The person who will restore at two in the morning is rarely the person who built the backup. The drill should be run by that person, following the written procedure, without help. Every question they have to ask is a gap in the procedure, and the drill is the only place where asking is cheap.

What to check before you commit

  • Restore into a clean environment, not the backup host.
  • Obtain the key the way an operator would in an emergency.
  • Ensure at least two people can reach the key material.
  • Keep a dated mapping of which key opens which archive.
  • Measure full and single-file restore times.
  • Verify data consistency, not just file counts.
  • Record each drill with date and operator.

An encrypted backup is a promise with a key attached. The drill is the only thing that converts the promise into something the organisation can rely on, and it costs an afternoon per quarter rather than a redesign.

Photo: William Hook from Stafford, United Kingdom, via Wikimedia Commons (CC BY-SA 2.0).

Two keys, two people, one archive

A backup key held by one person is a single point of failure in the same way a backup server is. Splitting the key material across two custodians, with a documented reconstruction procedure, means either can be unavailable without losing the archive — provided the procedure is written and has been performed at least once outside an incident.

Test that path during the drill: fetch the halves, reconstruct, decrypt. A split-key arrangement that has never been reconstructed is a more elaborate version of the single-key arrangement it replaced.

Leave a Comment