Writing
A backup is a system
The backup job is one of the few parts of a system that can look healthy while doing nothing useful.
It has a schedule, a log file and a green check. It runs at night, when nobody is watching, and it leaves a timestamp behind. For most of the month that is enough. Then something happens, and the only question that matters is whether the data can come back.
I have stopped treating a backup as a file copy that happens to run on a timer. A backup is a small system with its own inputs, boundaries, failure modes and promises. The job is only one component.
The green check is not a restore
A successful backup means that the backup process managed to write something it considered valid. It does not mean the archive is complete, that the source was readable, or that the destination will still be there when it is needed.
The failure can be quiet. A path was skipped because it was not mounted. A database dump succeeded but was empty. A permission change made one directory unreadable. The job kept running because the process itself never noticed that the content had changed.
This is why I want the restore path to be exercised separately. Not every backup needs a full restore every night, but there should be a known procedure and a recent proof. A restore test is the difference between “the job ran” and “the system can recover”.
A copy is not a strategy
Two identical cases look reassuring until you need to open one. The second case is not redundancy by itself. It becomes useful when it is readable, complete and independent of the first failure.
That is the standard I care about: can someone who did not create the backup find the right archive, restore it and verify the result without guessing?
The backup has a boundary problem
Backups cross boundaries. They read directories owned by other services, write to mounted storage and run inside a process supervisor. Each of those boundaries can say no.
A service can be configured to protect the filesystem, which is good until the repository is outside the allowed write path. A mount can disappear, and the job can happily back up a local fallback directory instead. A database dump can require credentials that the scheduler process does not have. None of these are exotic attacks. They are ordinary integration failures.
I now treat the write path as part of the backup design. If the process cannot write a lock file, the backup did not happen. If the destination is read-only, the job should fail loudly before it starts pretending to save anything.
Read-only is a feature until it is the wrong one
Sandboxing protects the host. A backup destination is also a deliberate exception to that sandbox. The two ideas have to meet somewhere, and that meeting point should be explicit.
If the destination is a local mount, the service must be allowed to write there. If it is remote, the transport and credentials are part of the same contract. There is no useful backup that only works in the administrator's head.
Retention is a policy, not a delete button
Retention sounds like a cleanup detail. It is really a statement about how much history the system can afford to keep and how quickly it can recover from a mistake.
A retention policy should answer a few questions before it becomes a cron expression:
- How far back do we need to reach for a normal mistake?
- How far back do we need to reach for a discovery that took weeks to notice?
- Which copies live in a different failure domain?
- Who is allowed to delete an archive, and what evidence is kept when they do?
Deleting old backups is not wrong. Deleting them without knowing what the oldest useful restore point is, is a different thing. The policy should be written down before the storage bill arrives.
Watch the silence
The most dangerous backup is the one that stopped running three weeks ago. There is no error to alert on, because there is no process left to produce one.
I want three signals for a small system:
- The timestamp of the last successful backup.
- The timestamp of the last successful restore test.
- The age and size of the newest archive compared with its recent history.
A job dashboard can show green while all three are stale. The dashboard is only as good as the question it asks.
The checklist I would use again
- Every important path is named explicitly, not inherited by accident.
- The backup process can write its lock file and its destination.
- A database dump is included, not only the files around it.
- A restore has been performed by someone other than the person who built the job.
- The retention policy has a reason, a duration and an owner.
- A missing backup produces an alert before a missing restore does.
A backup is not a command. It is a chain of small promises: the source can be read, the destination can be written, the archive can be found, the data can be restored and the result can be checked. The green check is only the first link.