fix(backup): install crontab root-owned so busybox crond runs it
busybox crond silently ignores a crontab not owned by root; the bind-mounted /config/backup/crontab is ginnoir-owned, so no dump or freshness check had run since the Oct 18 remount. Mount it at /crontab.src and install it 0600 root. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a09f7f6d52
commit
1f77238e35
1 file changed
+4
-2
@@ -58,14 +58,16 @@ services:
|
||||
- /config/backup/scripts/backup-run-snapshots.sh:/scripts/backup-run-snapshots.sh:ro
|
||||
- /config/backup/scripts/backup-check-freshness.sh:/scripts/backup-check-freshness.sh:ro
|
||||
- /config/backup/snapshot-paths.txt:/snapshot-paths.txt:ro
|
||||
# busybox crond reads <dir>/<user>; mounting at /etc/crontab meant no job ever ran
|
||||
- /config/backup/crontab:/etc/crontabs/root:ro
|
||||
# busybox crond reads <dir>/<user> and SILENTLY skips a crontab not owned by root;
|
||||
# the host file is ginnoir-owned, so it's copied in root-owned at startup (below)
|
||||
- /config/backup/crontab:/crontab.src:ro
|
||||
entrypoint: ["/bin/sh", "-c"]
|
||||
command:
|
||||
- |
|
||||
apk add --no-cache docker-cli curl jq tzdata >/dev/null
|
||||
# crond jobs get a bare env; scripts source this instead
|
||||
printenv | grep -E '^(NTFY_|KUMA_|KOPIA_REPOSITORY_PASSWORD=|TZ=)' | sed "s/=\(.*\)/='\1'/" > /etc/backup.env || true
|
||||
install -o root -g root -m 600 /crontab.src /etc/crontabs/root
|
||||
crond -f -l 8 -c /etc/crontabs
|
||||
depends_on:
|
||||
- kopia
|
||||
|
||||
Reference in new issue
Block a user