web: coach-site backup.service has never produced a backup (systemd % specifiers); no failed-unit alert #240
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Found 2026-10-16 while comparing the new OVH web node with production web (read-only).
What is wrong
backup.service("Coach Site Backup") on productionwebhas failed every day since the journal begins (2026-08-23), and/var/backups/coach-site/is empty: no backup has ever been written. The unit's own comment says it exists to protectsaved-but-unpublished drafts, which "only ever exist on disk here". They have had no backup for at least 54 days.
Cause
systemd expands
%specifiers inExecStart=before the shell sees the line. The command usesbackup-$(date +%Y%m%d-%H%M%S).tar.gz, so%mbecomes the machine id,%dthe credentials directory,%Hthe hostname and%Sthe state directory. The target file name becomes
/var/backups/coach-site/backup-/etc/systemd/systemf0cb4c61.../run/credentials/backup.service-web/var/lib.tar.gz(visible in the journal), tar cannot open it and exits 2.
Fix (belongs to the coach-site repo, not this one)
The unit is not in this repo (no role here defines it; roles here stay generic). In the unit's
ExecStart=escape every percent:$(date +%%Y%%m%%d-%%H%%M%%S). Check the rest of that line (thefind ... -mtimeretention part) for other%. Redeploy, then runsystemctl start backup.serviceonce and confirm a file appears in/var/backups/coach-site/.Gap in this repo
Nothing alerted. There is no failed-unit alert (no
node_systemd_unit_staterule inroles/prometheus/templates/alerts.yml.j2) andthe infra backup metrics only cover
infra-backup, not this unit. A unit that fails daily for weeks should page. Options: enable thenode exporter's systemd collector for
weband alert onnode_systemd_unit_state{state="failed"} == 1for more than an hour; or havethe app role write a textfile metric.
Note
The local copy lives on the same server (the unit says so), so it is not a substitute for off-server durability; published content is
already protected by git push.