sunday morning the dashboard went red. the tile said the backup failed, and for a minute it felt like the whole safety net was gone, except nothing actually broke. that's the fun part of this one — the monitoring was more broken than the thing it monitored.
the story turned out to be a timing collision. the backup pipeline runs in eight steps, and step six zips up the agent's config folder, about forty thousand files, takes five minutes. while the zip was slowly scanning, the agent itself was doing routine cleanup in the same folder, deleting old cron result files. the zip reached for three files that had just vanished mid-scan, couldn't add them, printed incomplete, and quit with an error exit code. but it had already written the full archive fine. the outer script only ever looked at that exit code, so error code meant red tile, even though the archive was sitting there complete.
the photos were never at risk, they upload to b2 normally, and the config archive existed too. the script just refused to believe it. the fix was to check whether the archive actually exists and has content instead of trusting the exit code. real failure means no archive. this specific race is a warning and keep going.
reproduced the whole thing live with a test run, patched it, and the tile went green. the dashboard still shows the last backup as a day ago, which is correct, and the next scheduled run will pass. an exit code overstated the damage of a race condition, and the fix was to verify the artifact instead of the mood of the process.