Backup hardening, UPS monitoring, Nextcloud cron, image bumps #10
Reference in New Issue
Block a user
Delete Branch "backup-hardening"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Six commits: the backup-hardening work plus UPS monitoring, Nextcloud background jobs, and container image bumps.
Backup hardening
home_smtpvault key added so the host can send system mailups role
NUT server on
home.debyl.iofor the CyberPower PR1500RT2U backing both it andtruenas.localdomain. Staged shutdown — TrueNAS sheds ~200 W at t+2min via its own native shutdown timer, host goes down at 10% charge — plus best-effort IPMI power-on when mains returns.The 10% threshold uses
ignorelb+override.battery.charge.lowrather than a custom poller, because CyberPower asserts its own low-battery flag around 20–35%, far too early to act on. Credentials come from vault vars; nothing sensitive is templated in the clear.Nextcloud background jobs
Both instances run
backgroundjobs_mode: cron, which expects an external caller every ~5 minutes — and nothing was calling. The personal instance hadn't run a background job since 2026-05-14, skudak since 2024-11-20.That meant trash and file versions never expired, stale chunked uploads accumulated, calendar reminders never fired, and
nextcloud.logwas never rotated — which quietly made the existinglog_rotate_sizecap inert.A systemd timer per instance now drives
cron.php. It skips cleanly when the container is absent or in maintenance, so deploys and image bumps don't parade as failed units, andType=oneshotgets an explicitTimeoutStartSecso a wedged run can't sit in "activating" forever and silently swallow every later tick.Trash retention
Nextcloud's default
autoonly expires trash under disk pressure, so 66 GB of >30-day deletions sat on a host with 1.3 TB free — effectively unbounded.auto, 30makes the 30-day expiry unconditional while still purging early when space is short.Image bumps
The fulfillr line records what is already running — both containers were rolled to that image on 2026-07-29 for SCRUM-156. Without it the repo claims an older tag than the host has, and the next
make deploy TAGS=fulfillrfrom a clean checkout would roll fulfillr backwards, breaking the portal against the new UI.Checks
make lint(yamllint) cleanroles/ups/is committed alongsidedeploy_home.ymldeliberately — the playbook now declares- role: ups, so splitting them would leave it referencing a role absent from the repoansible/vars/vault.ymlverified$ANSIBLE_VAULT;1.1;AES256on disk and stored git-crypt-encrypted in the object store, not plaintext🤖 Generated with Claude Code
esp32-stm32-vcu's scripts/release.sh uses jq to rewrite the protocol manifest before publishing it to S3. The image did not have it, so the release aborted at: ./scripts/release.sh: line 61: jq: command not found The failure mode is nastier than a red job. jq is only reached *after* the firmware .bin and version.json have already been uploaded, so clients were served the new build while the git tag, the Gitea release and the protocol manifest were never written — the repo still showed the previous release as latest while production served a newer one. Only jq was missing; aws and sha256sum are already present (verified in the rebuilt image: jq-1.7, aws-ok, sha256sum-ok). This surfaced when the skudak firmware jobs were moved into this image (they previously ran on the default gitea-ci image, which has jq).