Skip to content

feat(sensitive): a nightly backup timer on trinity (#404, #131) - #697

Merged
Gerrrt merged 1 commit into
mainfrom
gerrrt/vaultwarden-sensitive-tier-655ccb
Sep 28, 2026
Merged

Gerrrt merged 1 commit into
mainfrom
gerrrt/vaultwarden-sensitive-tier-655ccb

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Sep 28, 2026

Copy link
Copy Markdown
Owner

#404 step 9, the acceptance item on #131. The copy off the host already existed (#535); what was missing was anything that took a set unless someone typed the command.

What changes

  • systemd/sensitive/homelab-backup-sensitive.{service,timer} — make backup STACK=sensitive nightly at 04:30 (daily, not weekly: it holds the vault). Goes through run-scheduled.sh, so the outcome is backup-sensitive in the existing ScheduledJob* alerts, 2-day threshold.
  • install-timers.sh --profile sensitive — its own table (SENSITIVE_JOBS) and unit directory. The units carry @DEPLOY_ROOT@ / @RUN_USER@ (the build runbook writes the operator as <you>), rendered from SUDO_USER; install refuses anywhere but ~<you>/code/Gerrrt/HomeLab and never primes the backup.
    • --check runs checks 1–4 for both profiles, systemd-analyze verifys the rendered sensitive units everywhere (CI included), checks the sensitive timer is enabled where the tier is served from the checkout (compose working_dir label), and fails on a job name in both tables — the rules join on(homelab_job) alone.
  • make install-timers PROFILE=sensitive; validate.sh fails on trinity until the timer is installed.
  • ScheduledJobStale names {{ $labels.instance }} instead of "the monitoring host"; a promtool case pins the two-host join.
  • Docs — stack README, build and restore runbooks (incl. the wrong "step 5"), schedule-maintenance.md section, roadmap, changelog.

Not in scope: ADR-0023's off-estate copy — oracle shares the room and power. That is step 10.

Verified

  • install-timers.sh --check --require-all, check_docs.py, lint.sh, shellcheck, promtool backup.test.yaml — all pass (yamllint not installed locally).
  • Stubbed install: refuses from a worktree; from ~/code/Gerrrt/HomeLab renders the units, writes the one threshold, enables the timer.

After merge, on trinity

make install-timers PROFILE=sensitive
sudo systemctl start homelab-backup-sensitive.service
cat /var/lib/node_exporter/textfile_collector/backup-sensitive.prom

last_exit_code 0 and the set on both sides of ARGS=--list → close #131.

Refs #404, #131

🤖 Generated with Claude Code

existed (#535); nothing took a set unless someone typed the command.

- systemd/sensitive/homelab-backup-sensitive.{service,timer}: make backup
  STACK=sensitive nightly at 04:30, through run-scheduled.sh, so its outcome
  is backup-sensitive in the ScheduledJob* alerts (2d threshold).
- install-timers.sh --profile sensitive: its own table and unit directory;
  units carry @DEPLOY_ROOT@/@RUN_USER@ rendered from SUDO_USER, and install
  refuses anywhere but ~<you>/code/Gerrrt/HomeLab. --check covers both
  profiles, verifies the rendered units everywhere, and fails on a job name
  in both tables.
- validate.sh: fails on trinity until the timer is installed.
- ScheduledJobStale names {{ $labels.instance }}; promtool pins the
  two-host join.
- Docs: the stale "nothing schedules / nothing copies" lines corrected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gerrrt
Gerrrt force-pushed the gerrrt/vaultwarden-sensitive-tier-655ccb branch from 143f5e7 to 7dbffdf Compare September 28, 2026 20:38
@Gerrrt
Gerrrt merged commit 30fc97d into main Sep 28, 2026
7 checks passed
@Gerrrt
Gerrrt deleted the gerrrt/vaultwarden-sensitive-tier-655ccb branch September 28, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sensitive tier: Vaultwarden

1 participant