← All posts

When the backup is the part that lets me down

I've recovered mailcow, my email server, from a month-old backup because newer backups weren't working. I got the service back, but that experience is a fairly direct answer to why I care about the age of the newest usable copy.

In Zebra, my Kubernetes cluster, I now have automated database restores as well as scheduled backups. There's still a gap between restoring one database inside a working cluster and recovering everything after losing the equipment room. Following the data through that gap is more useful than increasing backup frequency and hoping for the best.

Getting the right data into the copy

First, the data has to be included. Ordinary file-copy jobs can cover selected directories on TrueNAS, my storage server, without seeing inside its iSCSI block volumes. A newly added volume can be absent while the existing jobs remain green. I need to reconcile live storage with backup sources and retain enough information to recognise which volume belongs to which application.

Then the jobs have to keep running. Expired credentials, quotas, connectivity, or a disabled schedule can stop new copies. Alerts need to detect absence and staleness as well as an explicit failure. External monitoring helps with home outages, but doesn't automatically prove every backup's contents are checked.

My routine volume exports record upload acknowledgements and local checksums. They don't routinely download and restore the uploaded result. Independent readback can reveal an unreadable stream; restoring an incremental chain also checks that its full backup and predecessors still exist.

Included -> uploaded -> retained -> decrypted -> restored -> useful

A success at one step doesn't complete the remaining steps.

Bringing related state back together

Garage, my object store, holds database backups and application objects on TrueNAS. Its metadata and object blocks now occupy separate volumes. Restoring one successfully doesn't establish a compatible pair. A cache flush before snapshots helps with pending writes, but doesn't coordinate application transactions across volumes.

That's why an earlier single-volume Garage restore can't validate today's layout. The current backup work still needs coordinated recovery checks. Similar care applies to a photo application's files and database: both need to describe a usable collection together.

A destination migration creates another trap. An older recovery reference may still point to perfectly readable, outdated database history. The restore needs an explicit source and recovery point, not merely whichever archive is easiest to find. I also need the application version and extensions that can use the recovered data.

Having something left when I need it

Retention has to outlast discovery of the mistake. A recent copy won't undo damage that went unnoticed until all older versions expired. Conversely, keeping every snapshot forever eventually consumes finite space. Before pruning history, I need to establish what recovery window it supports and test an older restore.

The copy also needs keys and configuration available without the failed NAS or cluster. Deletion protection matters if an attacker can use production credentials against backups. Neither an encrypted object nor a separate bucket proves that protection. Independent decryption and protected retention remain unfinished checks here.

I've restored many services, and that experience is useful. For the next exercise, I want to record the age of the recovered data and the full time to useful service, including access and replacement capacity. Database tables and file hashes are partial evidence; opening photos or using the restored application adds the test people actually care about.

Losing last night's uploads can be tolerable where originals remain on clients. Losing the collection isn't. That's the trade-off behind my recovery targets: spend effort on the weak link in the chain, not just the number on the backup schedule.

← Back to the notebook