🔄 Detecting iCloud Eviction During Backup Verification

I improved verification of a local iCloud backup mirror after discovering that a file can disappear or become unreadable during the check. The lesson was that a backup receipt must describe what was actually verified, not what the directory looked like at the start.

🎯 Goal

The verifier needed to identify the filename and system error, distinguish eviction from a generic failure, and alert when a mirror became stale.

🛠 What I Did

I added measured coverage for mirror verification, named unreadable files, and made the check defer when iCloud removed a file during the run. I also recorded that a successful upload and a current local mirror are separate facts.

🔗 Key Cybersecurity Connections

Backup integrity is an availability control. A directory listing or a previous receipt cannot prove that every required object is restorable now.

🚨 Detection Opportunities

Useful fields include the exact path, errno, verification timestamp, source revision, upload result, and freshness state. A NOT_CHECKED or STALE result is safer than a false green status.

âš  Challenges

The work did not create a restorable Time Machine backup where none existed. That gap remains a risk to address separately.

📚 What I Learned

Verification must model concurrent storage behaviour. Filesystems and cloud-backed folders can change during the check, so the verifier needs an honest residual state.

😄 TL;DR

A backup check is trustworthy only when it reports what survived the check, including files that vanished halfway through it.