KEEP=30 (last 30 archives) approximated 30 days only if there was
exactly one dump per day. Prune by file mtime instead (find -mtime +30)
so a catch-up burst after time offline doesn't prematurely evict
recent dumps, and a quiet stretch doesn't hoard month-old ones.
rc.unassigned umount always does a lazy unmount and reports success
unconditionally, even with an open cwd on the mountpoint - it never
actually refuses on its own. Check with fuser -m first instead, and
just leave the disk mounted if anything is using it.
Previously the pull script mounted the Unassigned Device and left it
mounted indefinitely. Now tracks whether it was already mounted before
this run and only unmounts at the end if it wasn't - never disturbs a
mount already in place for some other reason. Handled via an EXIT trap
so it fires on any exit path, not just success.
Found and fixed a real bug testing this: the script cd's into the
mounted directory and never leaves, so the unmount was failing with
"target is busy" (the shell's own cwd still being on the device) until
the cleanup function explicitly cd's out first. Verified both
directions live: already-mounted stays mounted after; not-mounted gets
mounted, used, and cleanly unmounted again.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Every script/config built this session (sanity-check, attacker-check,
the Gitea backup pipeline on both ends) now lives in this repo as
reference copies, not just described in prose - previously they only
existed on the live servers.
Split into scripts/alpha/ (Ubuntu 24.04.4 LTS) and
scripts/clients/vlda-01/ (Unraid 7.3.2), each with its own README
stating the exact OS/kernel and a file-by-file map to deployed paths,
since a script written for one host's conventions doesn't just work
unchanged on the other - the vlda-01 README in particular documents
the persistence gotchas that actually broke earlier attempts (RAM-
backed root filesystem, VFAT /boot with no execute bit, Unassigned
Device auto-mount). Root README.md now links directly to these files
from each relevant section instead of only describing them.
Explicitly not included: the dedicated SSH private key vlda-01 uses to
authenticate to alpha - noted in clients/vlda-01/README.md to
regenerate rather than ever commit one.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>