Detecting iCloud Eviction During Backup Verification
๐ 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.