Add failure logging/email notification in backup.sh; harden /opt/backup perms

This commit is contained in:
Christoph Haas 2026-09-19 22:20:31 +00:00
parent d06a9eac7d
commit 68aae4715d
5 changed files with 57 additions and 5 deletions

View file

@ -107,6 +107,10 @@ EOF
systemctl daemon-reload
systemctl enable --now pbs-backup.timer
# 8. Hardening: deny read/write/execute to "others" for everything in /opt/backup
# (including the directory itself), so config and backups are not world-readable.
chmod -R o-rwx "$BACKUP_DIR"
echo
echo "Done. Fill in the credentials, then run ${BACKUP_DIR}/backup.sh (or wait for the timer):"
echo " ${EDITOR:-vi} ${ENV_FILE} # server/datastore/namespace/token"