diff --git a/tools/zig-mirror.md b/tools/zig-mirror.md index 3905a6e36060f2e90dfa52d17e1ec7d544b7a9d6..d94db4dd37fc27467488ad07b4fa8e49887b0303 100644 --- a/tools/zig-mirror.md +++ b/tools/zig-mirror.md @@ -7,13 +7,11 @@ The mirror container shares only the Zig subtree. Flat protocol URLs fetch missing files synchronously, then serve them locally; nested release/dev paths remain browsable through Copyparty. -[Zig's mirror contract](https://codeberg.org/ziglang/ziglang.org/src/branch/main/MIRRORS.md) -requires HTTPS on **both IPv4 and IPv6**. Do not submit this mirror to Zig's list -until both address families work from outside the LAN. On 2026-10-17 the host -had a public IPv6 RA address/default route, but outbound IPv6 to Zig and Google -failed and `file.paperclover.net` had no AAAA record. DDNS currently updates A -records only. A working delegated prefix/router firewall and matching AAAA -publication must be verified before enabling dual-stack discovery. +This is a personal IPv4 mirror at `https://file.paperclover.net/mirrors/zig/`. +Clover explicitly chose to leave it unlisted and omit IPv6 publication. +[Zig's public mirror contract](https://codeberg.org/ziglang/ziglang.org/src/branch/main/MIRRORS.md) +requires both address families, so this deployment is not submitted to that list. +No AAAA record or DDNS IPv6 change belongs to this rollout. The worker polls the official index every six hours and caches the latest stable release and current development build. A request for any uncached supported name @@ -27,22 +25,21 @@ one-time `verify` operation before first public exposure. ## Production cutover -This is a reviewable runbook, **not an executed migration**. The 2026-10-17 -inventory found 267 GiB / 10,063 files in `/srv/mirrors/zig`, on `globe/mirrors`. -The destination Zig directory existed empty on `globe/clover/Media`, with about -9.13 TiB available. These are different filesystems: an atomic rename cannot -move the tree. Preserve the old tree until copy verification and public checks -finish. Both roots use group `chloe` (GID 3000). +The 2026-10-17 production inventory found 289,931,243,359 bytes / 10,063 files +in `/srv/mirrors/zig`, on unencrypted `globe/mirrors`. The destination existed +empty on encrypted `globe/clover/Media`, with more than 9 TiB available. +These are different filesystems and encryption roots: neither atomic rename +nor block cloning can perform the move. Both roots use group `chloe` (GID 3000). -After production approval, confirm the host machine ID -`691734bfb3c24b19ae66e5cacd17f5e2`, mounts, free space, and that no writer is -changing the old tree. Then copy without deleting the source: +Confirm the host machine ID `691734bfb3c24b19ae66e5cacd17f5e2`, mounts, free +space, and that no writer is changing the old tree. Copy without deleting the +source: ```sh findmnt -T /srv/mirrors/zig findmnt -T /srv/clover/Media/Software/Public/zig -rsync -aH --info=progress2 /srv/mirrors/zig/ /srv/clover/Media/Software/Public/zig/ -rsync -anrc --delete /srv/mirrors/zig/ /srv/clover/Media/Software/Public/zig/ +rsync -aHAX --numeric-ids --info=progress2 /srv/mirrors/zig/ /srv/clover/Media/Software/Public/zig/ +rsync -anHAXc --numeric-ids --itemize-changes --delete /srv/mirrors/zig/ /srv/clover/Media/Software/Public/zig/ ``` The checksum dry run must report no differences. Preserve existing numeric @@ -50,15 +47,17 @@ ownership and ACLs; do not recursively chown the Media dataset. The destination root must retain group traversal/write access for the mirror's declared Clover group. Run the mirror image's `verify` command against the copied destination before publishing it. A disposable container can bind that exact subtree -read-only. Retain -any old `.hist` metadata privately; anonymous users lack dot-file permission. +read-only. The checksum and authenticity passes may run concurrently with +bounded CPU/I/O to reuse the filesystem cache. Both must finish successfully. +Retain old `.hist` metadata privately; anonymous users lack dot-file permission. Promote the reviewed configuration through `tools/deploy.py prod`. Do not replace containers by hand. Confirm anonymous GET/HEAD/Range on flat and nested URLs, anonymous upload/delete denial, authenticated existing shares, and that parent -folders remain inaccessible. The source can be retired separately after the -verified copy and service behavior are accepted; it is not an active second -mirror and no alias is required. +folders remain inaccessible. Only after copy verification and positive public +checks, rename the original tree to `/srv/mirrors/zig-retired-` and link +`/srv/mirrors/zig` to the canonical NAS tree. Keep the retired tree as a recovery +copy; this cutover never deletes it. The NAS tree is the only active mirror. ## Backfill and manual refresh