Skip to content
← Back to writing

September 27, 2026

The backup that never left the box

For days I was told the backup problem was a drive I needed to buy. The real problem was that every backup bound for the backup server had to fit on the box's own boot disk first.

For most of a week, every conversation about backups on my fleet ended in the same place: the backup server needs a bigger drive, and I would buy one once I knew the size. On Sunday afternoon, with a sprint of 24 finished tickets waiting to close, that line came up again and I stopped to question it. Nobody had ever given me a number. I had no plans to buy anything. And underneath that was a question I had never actually asked out loud, which turned out to be the whole bug.

Real evidence read from t320-b and posted to EOS-2267: the scheduled backup refused for needing 148.9 GiB on a disk with 17.6 GiB free, an empty answer from the remote listing, and on 27 September the backup server holding nothing for this box newer than 16 September.

The question

This is roughly what I typed at 3:27 that afternoon:

I don't understand why the backups are living on the machines in the first place. No backup should be living on the machine that it's backing up. That's why we have a deduplicating backup server. That's where the backups are all supposed to go.

The Eight.ly Backup Server exists so that a box never has to hold its own copies. It deduplicates across the fleet and it lives on separate hardware, the R730xd. Each box's scheduled job is pointed at it. So when the coordinating agent kept talking about disk space on the boxes themselves, the thing I could not square was why the boxes were involved at all.

The answer was already sitting in EOS-2267, a ticket filed on September 17 and diagnosed the day before by reading t320-b directly. A scheduled job aimed at the backup server did not stream anything to the backup server. It first wrote a complete archive into /backups on the box, then uploaded that. On t320-b, /backups sits on the boot filesystem. The VMs on that box needed 148.9 GiB staged, the boot disk had 17.6 GiB free, and the free-space floor refused the run before a single byte went anywhere. Retention tried to help. It deleted 5 of the 9 local copies to make room and freed 15.4 GiB, which was not enough, and the same thing happened the next night, and the night after.

So the box was deleting its own local backups to make room for a backup that was supposed to end up somewhere else, and then failing anyway. The backup server held nothing new from t320-b since September 16.

Why nobody could see it

The product has a route that is meant to answer exactly this. GET /api/backup/remote/<name> lists what the backup server holds. When it was asked about the backup server target, /api/backup/remote/ebs, it returned an empty list with success: true. It treated "ebs" as the name of a guest, found no guest by that name, and reported a clean, empty result. The one place I could have looked to ask "are my copies on the server" could only ever say "none" in the tone of a healthy answer.

That is the pattern I keep running into in this codebase. Something that never measured the thing reports a result anyway. An empty list and a missing route look identical from the outside.

Three rounds and two holes

EOS-2267 had already been through three rounds the day before. I run Codex as a worker on tickets like this and have a second pass review its work. The rule in my process is that the third review asking for fixes parks the ticket instead of starting a fourth cheap pass. It got parked on September 26 with a written brief of what was still wrong.

Round three left two holes, and the first was worse than the original bug. The worker had correctly turned off the local free-space floor for jobs headed to the backup server, since those should not need local space. But a VM whose first disk was a raw block device still staged its whole archive under the local backup root, on the boot disk. With the floor off, nothing would stop it. The fix had removed the one guard that was preventing the disk from filling.

The second hole was the listing route. The worker's own test locked in the wrong behaviour, asserting that /remote/ebs treats "ebs" as a guest.

So on Sunday, once the new sprint was started at 3:34, I took EOS-2267 back and worked it directly with Claude Code instead of sending it out again, starting by rebasing the branch, which had fallen 27 commits behind dev.

What the fix does

PR #1767 merged at 4:27 PM. It touches 17 files, 709 lines added and 39 removed, and most of the additions are tests.

A backup headed for the backup server is refused before anything is written if its staging would land on the system disk. If the code cannot read which filesystem a path is on, that refuses too, rather than guessing. A failed upload is now recorded in the job history as a failed backup instead of a finished one. A backup server target with no server configured fails instead of quietly succeeding as a local copy. And the bare route, GET /api/backup/remote/, now lists every group the server holds under this node's name, for VMs, containers and app data.

For each piece I wanted proof that the test was watching the right thing, so after committing I removed the guard call and confirmed the job test failed, then removed the owner filter on the listing and confirmed that test failed too. The vm and lxc packages also went through the race detector before the push, since the race gate in CI covers both.

On the box

That evening I cut v2.3.60, with this line at the top of its notes: "A backup meant for the Eight.ly Backup Server no longer writes a whole copy to this box's system disk first." t320-b and the NAS took it through their own update screens.

At 7:08 PM I asked t320-b what the backup server holds for it. Each VM came back with one or two copies, all from September 15 and 16, and web-dev had none. That matched the diagnosis: nothing had left the box in eleven days. The node-wide listing on the NAS returned an error instead of a list, because the backup server itself has no call that lists its groups, only one per group. That became EOS-2408, which also meant the cleanup of old copies on the server had never been able to run against the real thing.

What I took from it

I spent days accepting "buy a drive" as the shape of the problem because it arrived with confidence and nobody contradicted it, me included. The drive was never the issue on the boxes. The design asked every box to hold a full copy of its own backup before sending it away, and on a boot disk that is mostly full, that can never work.

The question that broke it open was a plain one about where backups are supposed to live. I should have asked it a week earlier. When a fix keeps being described as hardware I have to buy, I now want the measured number first, and the path the data actually takes second, before I agree that the hardware is the problem.