RECOVERY ENGINEERING / PRINT EDITION
Rebuild an independent, testable backup system for the Arch host while retaining the predecessor snapshot root and using its configuration as guidance, not as a template.
/mnt/stag/rsnapshot/ and use its existing interval hierarchy as the seed for a new rolling history. Preserve hard links and historical recovery points by making only verified, same-filesystem renames. Replace stale paths and unsafe live database copying. After each approved Brooklyn backup attempt, attempt to suspend Brooklyn through a dedicated restricted SSH key, while respecting Brooklyn's normal system sleep inhibitors.Not a substitute for Snapper: Snapper provides quick local Btrfs rollback. Rsnapshot provides independently stored, versioned file recovery on the separate /mnt/stag disk. A later off-host replica remains required for disaster recovery.
| Legacy fact | Observed configuration | Modern interpretation |
|---|---|---|
| Snapshot root | /mnt/stag/rsnapshot/ | RETAIN Keep the existing root and use its interval trees as a verified rolling seed. Never copy or move them across filesystems. |
| Retention | 7 daily, 4 weekly, 12 monthly, 4 yearly | KEEP Start with the same recovery horizon, then revisit after real capacity measurements. |
| Schedule | The packaged /etc/cron.d/rsnapshot sample existed but every run line was commented. | CHANGE Use explicit systemd timers with Persistent=true; Cronie remains available for user cron jobs. |
| Database hook | mysqldump --all-databases | CHANGE Use a restricted backup account and mariadb-dump --single-transaction --routines --events. |
| Post hook | SSH command suspended brooklyn after each snapshot. | REPLACE The approved Brooklyn-specific job will attempt suspend after every backup attempt, success or failure, using a restricted key and explicit local logging. Remote systemctl suspend keeps its normal inhibitor behavior. |
| Remote pulls | Data was pulled from brooklyn and cake using Jim's SSH key. | CONFIGURE NOW Retain both source sets in the active configuration. Cake is reachable; Brooklyn is configured with Wake-on-LAN and is an immediate availability blocker, not deferred scope. |
The diagram separates data already local to this host from optional remote/legacy scopes. Solid lines are planned for the first usable backup. Dashed lines require a separate approval.
The existing snapshot directories are not merely old files. Rsnapshot links files across interval trees, so they are part of the recovery structure. The migration changes the configuration only after it proves where current data belongs in that structure.
| Existing snapshot namespace | Candidate current source | Migration treatment |
|---|---|---|
bonecrusher/etc/ | /etc/ | RETAIN Compare, then continue using the existing canonical namespace. |
bonecrusher/srv/ | /srv/ | RETAIN Compare current restored site content before first sync. |
bonecrusher/opt/ | /opt/ | AUDIT Include only application paths that remain authoritative. |
bonecrusher/usr/local/ | /usr/local/ | RETAIN Compare and preserve local tools/configuration. |
bonecrusher/var/www/ | /var/www/ | RETAIN Compare and continue in the canonical web-content namespace. |
bonecrusher/var/mail/ | /var/mail/ | RETAIN Compare Maildir metadata and message content before enabling sync. |
bonecrusher/var/spool/ | /var/spool/ | AUDIT Include selected application spools, not transient queues blindly. |
bonecrusher/var/local/ | /var/local/ | RETAIN Compare and include if present. |
bonecrusher/mysql/ | root-only MariaDB export staging | REPLACE CONTENT Retain the logical namespace but replace the legacy dump with a consistent current export. |
bonecrusher/var/lib/geneweb/ | GeneWeb absent | PRESERVE ONLY Do not sync until the backend returns and its authority is confirmed. |
bonecrusher/mnt/anvil/{mail,spool,www}/ | possible predecessor-mounted duplicates | COMPARE FIRST Do not rename or merge based on path similarity; establish whether each tree duplicates the canonical var subtree. |
bonecrusher/mnt/{sternum,hammer}/ | legacy archive disks | SEPARATE POLICY Retain history; include only after an authority and capacity decision. |
brooklyn/ | approved remote backup source | DEDICATED JOB After each backup attempt, log the result and attempt remote suspend through a forced-command key. A remote inhibitor may deliberately prevent sleep. |
cake/ | active remote backup source | CONFIGURE NOW Retain legacy home, Apache, web-root, and systemd sources. Cake is reachable and its configured source paths are present. |
laundry/ | legacy remote source | UNTOUCHED No pull or rename until separately approved. |
daily.*, weekly.*, monthly.*, and yearly.* tree. Record source namespace, candidate live source, size, newest modification time, owner, verification result, and decision.rsync --dry-run comparisons. A matching path name is insufficient evidence that the current and legacy datasets are equivalent.mv within /mnt/stag/rsnapshot/. This preserves inode links; copying or cross-filesystem moves are prohibited.| Scope | Initial treatment | Reason |
|---|---|---|
| Configuration | INCLUDE /etc, /root, /usr/local, selected /opt | Required to rebuild services, cron, Apache, Keycloak, Postfix, and backup automation. |
| Content and mail | INCLUDE /var/www, /srv, /var/mail, application upload/data paths after audit | Contains restored web assets, static content, and Maildir. |
| MariaDB | DUMP into root-only staging, then snapshot the dump | Never use rsnapshot to copy live InnoDB data files as the database backup. |
| Docker | AUDIT bind mounts and named volumes; exclude overlay layers and images | Container images are reproducible. Persistent data is not. |
| Runtime/cache | EXCLUDE /proc, /sys, /dev, /run, /tmp, caches, Snapper snapshots, destination tree | Prevents recursion, noise, unsafe pseudo-files, and unnecessary capacity use. |
/mnt/sternum | PRESERVE AND DEFER | Its historical snapshot namespace remains in place. A new sync policy needs a source-authority decision and capacity measurement before it is enabled. |
/mnt/stag. Establish approved free-space and failure thresholds before changing the retained tree.var and mnt/anvil trees before configuration exists./mnt/stag/rsnapshot/. Add a preflight that rejects an unmounted or low-space target rather than writing into an accidental local directory. Use one_fs=1; add mounted data deliberately.bonecrusher/mysql namespace for the new export.rsnapshot@daily, weekly, monthly, and yearly services/timers. Use Persistent=true, flock, ordering after the database export, and independent log/failure reporting. Initial schedule: daily after Jim's 03:28 Maildir sync. Implement Brooklyn as a separate job with a forced-command SSH key; after every completed attempt it records backup status, attempts remote systemctl suspend, and records whether Brooklyn slept or an inhibitor prevented it.rsnapshot configtest, dry-run the sync, and verify expected transfer volume. Perform a documented file, Maildir, configuration, and isolated MariaDB restore drill before the first rotation.legacy-2026/ namespace. That alternative needs a new baseline and materially more capacity.| Interval | Retention | Planned cadence | Guardrails |
|---|---|---|---|
| daily | 7 | 04:30 local time | After Jim's 03:28 Maildir sync; database export must succeed first. |
| weekly | 4 | Sunday 05:15 | Never overlap with daily; same mount and capacity preflight. |
| monthly | 12 | Day 1, 06:00 | Evaluate destination growth; include the separate legacy-archive run only after capacity approval. |
| yearly | 4 | January 1, 07:00 | Restore sample before relying on the oldest tier. |
/mnt/stag, not the root Btrfs disk.| Item | State | Condition to enable |
|---|---|---|
| Brooklyn remote pull and suspend | APPROVED DESIGN | Implement after source/reachability audit using a dedicated forced-command key. Suspend is attempted after every backup attempt, including failures, but no inhibitor is bypassed. |
| Tide/laundry sources | DEFERRED | Repair the failed Tide mount and decide which data is authoritative rather than duplicated. |
Legacy /mnt/sternum archive | DEFERRED | Measure its baseline, reserve capacity, make one verified copy, then schedule monthly updates. |
| Frozen legacy history | DECISION REQUIRED | Choose rolling continuity or a permanent legacy-2026/ namespace before the first interval rotation. |
| Off-host backup | NEXT DESIGN | Select encrypted external or remote storage after the local restore drill succeeds. |