Skip to content

Lesson 9 of 9 · 29m

Backup Targets, Immutability, and Restore Proof

Design backup targets around threat models, separate credentials, test restorability end to end, and measure recovery time rather than admiring backup success messages.

A backup that has never been restored is a hypothesis. Worse, many "backup" systems are merely replication systems controlled by the same credentials that production uses. Ransomware operators understand this perfectly. They delete snapshots, encrypt backup repositories, and use the victim's own automation because it is convenient and already trusted.

Design from the threat model backward

List the events recovery must survive:

operator deletion          accidental rm, wrong host, wrong dataset
application corruption     bad writes replicated faithfully
ransomware                 attacker with production credentials
hardware loss              array, enclosure, rack, or site failure
control-plane compromise   hypervisor, NAS admin, cloud account
retention requirement      legal, customer, or business recovery point

Now ask which credential can destroy which copy. If the production host can write and delete backup files through the same mount, malware on production can do the same. Pull-based backups, append-only repositories, object-lock retention, separate administrative domains, and offline copies exist to break that symmetry.

Backup target patterns

Common targets have different strengths:

NAS share          convenient, often too writable, same admin domain risk
dedicated host     flexible, can use pull model and separate credentials
object storage     immutable retention options, versioning, high durability
tape/offline       strong isolation, slow recovery, operational discipline
replica array      fast availability copy, still vulnerable to synchronized corruption

A hardened backup host should not mount production with write privileges. Ideally it pulls over restricted transport, stores into a filesystem or object layout production cannot modify, and uses credentials unusable for production administration.

Immutable does not mean invincible

Object lock, snapshot locks, WORM shares, and append-only repositories raise the cost of destruction. They do not help if the control plane that manages retention is compromised. Separate backup console credentials, MFA, backup network access, and deletion rights from everyday administrator accounts. Test whether the supposed immutable copy can actually be deleted by the credentials available to an attacker path.

Prove the full restore path

Restore testing must include more than opening one old file. For file trees, restore with preserved metadata (rsync -aHAX --numeric-ids) and hash-check representative files. For databases, restore into an isolated instance and run validation:

pg_restore --clean --if-exists -d app_restore backup.dump
psql app_restore -c 'select count(*) from accounts;'
mysqldump --single-transaction app | gzip > app.sql.gz

Record three measurements: recovery point objective actually achieved, recovery time objective actually achieved, and manual steps discovered. The discovered steps are often the real deliverable: missing keys, undocumented DNS changes, absent certificate material, or bootstrap scripts that no longer run.

End-to-end integrity means verify after movement

Files can survive production checksums, then corrupt in backup transfer, at rest in the repository, or during restore. Use application-native verification where available, plus independent hashes for archive-level artifacts. Restic, Borg, ZFS replication, and object storage all provide pieces of integrity assurance, but only a successful restore proves the whole chain.

Field notes

  • Backup success notifications measure job completion, not recoverability.
  • Encrypt backups, but protect key material as carefully as the data; encrypted garbage with lost keys is still garbage.
  • Include identity, secrets, configuration, and bootstrap state. Data alone rarely rebuilds a service.
  • Keep restore documentation executable and boring; a disaster is not the time for archaeology.
  • Periodically restore to isolated infrastructure and power it on. File-level checks miss service-level dependencies.

Was this lesson helpful?

Sign in to rate