Where the copies live
deployment diagram
The live tree sits on jungle. At 03:00 every night it is copied to propolis and checked byte for byte. About four times a year it also goes to a cellar drive kept offline. aviary works on jungle over SMB and SSH, and jungle reads the phone over SSH.
The nightly at 03:00
sequence diagram
One launchd job runs the whole night, not only the copy. The shrink guard decides first: a tree that has lost its core is never mirrored over a good copy. The report goes out every night, whatever happened before it.
The life of a cellar drive
state machine diagram
A cellar drive spends nearly all its life on the shelf. /honeycomb-cold takes one through the copy, the Leg A check, the scrub and the ledger, then unmounts it. Any failure exits 1, so cold-sync.sh cellar-A && cold-sync.sh cellar-B never syncs the second drive after a bad first one.
Three copies, one shape
class diagram
The three copies share one shape and differ only in where they live, who writes them and how often. Each copy is checked against a manifest with one row per file. Rot is the same size and mtime with a different hash. Restore reads a copy into a staging folder and never writes into the live tree.
Getting a record with /album
activity diagram
Qobuz first, Soulseek second, lossless FLAC only. Each lane is where the files are at that step. A failed verify leaves the files in the Bus, and only a ✓ goes on to /archive, which files it without asking.