DV.OS 8.X/BLOG/POST 3 OF 11/WHAT WE DO
Digital Vision
~/blog/the-backup-that-reported-success.md
Cover for The backup that reported success: the working day drawn as a line, broken for the hours the business was dark, with a coral marker on this post's moment

The day the laptop died · Post 3 of 11 · The day

The backup that reported success

In shortThe rule: a backup you have never watched fail is not a backup. Break it on purpose, make sure it screams, and check it runs on the machine you actually work on — not the one you intend to.

On 114 nights my Mac backed up nothing, wrote a line in a log saying it had finished, and went back to sleep.

Not one of those runs said failed. Not one said 0 files, is that right? Every run, at ten o'clock, in a log nobody reads because nothing was ever wrong, wrote this:

summary: backed=0 skipped=0 failed=0

Zero backed up. Zero skipped. Zero failed. Three zeroes, and the third one is why I never looked.

Every scheduled run between 8 June and 17 October. The two solid marks at the start are the only times the system ever moved a file, and I ran both of those myself, by hand, on the day I set it up.

It had worked exactly twice, on the day it was built

The two runs that did something were both manual, both on the morning of 8 June, within minutes of the thing being written — 10:13 and 10:20. One pushed 45 repositories, the second 46, with seven and six failures respectively, which I'd have looked at if the next 114 nights hadn't gone so quiet.

That's the shape of this kind of failure. It works when you watch it. It is watched precisely once, on the day you build it, while you're pleased with yourself. Then the schedule takes over and it never works again, and the only thing standing between you and finding out is a log line that says failed=0 in a technically accurate way.

Here's the part I'd push back on if someone told me this story: surely you'd notice. No. The whole point of automating something is to stop thinking about it. A silent success is indistinguishable from a real one from the outside, and that is the entire bug.

The log stopping was a different failure from the one I assumed

When I first saw the log ended on 17 October, I read it as the script finally dying.

It wasn't. The log stops on 17 October because that Mac went offline and stayed offline. It was last booted on 14 September, ran until the middle of October, then sat switched off in the corner of the office until the afternoon I needed it.

So there were two separate holes, and only one of them was a bug:

  1. The script was broken every time it ran. 114 for 114.
  2. The schedule was on a machine I wasn't using. A backup that only runs when you happen to wake a spare Mac is not a backup. It's an intention.

And there is a third thing hiding in those dates, which I only found when someone checked my arithmetic. Those 114 runs span 132 nights. Eighteen nights are missing entirely — including an unbroken fifteen-night gap from 29 August, ending the day that Mac was next switched on. So for part of the period the broken backup wasn't even failing. It simply wasn't there, and the log gave no more sign of that than it did of everything else.

The second one is the one I'd have defended if you'd asked me the week before. Of course there's a nightly backup — on the other Mac, the one that's always plugged in. It had been off for six weeks.

The replacement, and the test it immediately failed

The new version took a few minutes to write, and it was checked against its own failure modes rather than against a happy path. On its first run it found the repositories the old one had reported as zero, said out loud that one of the folders it expected didn't exist, and exited with a failure code instead of a cheerful summary.

Then I scheduled it, and it did something better than work: it reproduced the original bug, and told me.

find: /Users/…/digital-vision: Operation not permitted
[FATAL] found 0 git repos across 2 root(s).

A scheduled job on macOS doesn't inherit the permissions of your terminal. Run by hand it could read everything; run on a schedule it could read nothing — which is exactly what had been happening to the old one for four months. The difference was no longer the bug. The difference was that this time the bug was loud: non-zero exit, a notification, a summary that says what went wrong instead of counting to zero.

Fixing it needed me at the keyboard for two minutes, granting disk access to a background process, in a file picker that can't see the folder it needs unless you know the keyboard shortcut to type a path by hand. That's the sort of step no script can take for you, and it's worth knowing in advance which ones those are.

Every night, June to October

summary: backed=0 skipped=0 failed=0
exit=0

Nothing copied. Reported as success. 114 times.

15:31, the day it mattered

backed=67 verified_ok=67 failed=0
conflict=0 unprotected=1 foreign=1
skipped=1 of 70 repos
exit=0

Each of the 67 re-read from GitHub to confirm the commit landed.

The same system, before and after. The number that matters is not 67. It is verified_ok=67 — the count of repositories it went back and checked, rather than the count it believed it had sent.

What I'd tell anyone with a backup they've never seen fail

The machine that died had already had its logic board replaced once. I'd had my warning, and I'd responded to it in the most natural way available: by setting up something automatic and then trusting it, which felt like the responsible thing to do and was actually the opposite.

So the test isn't whether a backup runs. Mine ran 114 times — on the nights it ran at all. It isn't whether it reports success either, because mine did that 114 times too.

The rule: a backup you have never watched fail is not a backup. Break it on purpose, make sure it screams, and check it runs on the machine you actually work on — not the one you intend to.

Next: I did have a system, and it held. What didn't hold was everything watching it.