neb/common/restic/backup.sh
2023-10-18 01:31:05 +02:00

13 lines
No EOL
502 B
Bash

#!/bin/sh
/neb/common/ntfy.sh -m "performing backup..." -e "warning" https://push.ixvd.net/infra-backups
if restic \
-r "sftp://ixvd_backup_storage//backups/restic-$(hostname)" \
-p "/neb/secrets/restic/$(hostname).secret" \
backup \
--tag auto \
/srv /home /etc; then
/neb/common/ntfy.sh -m "backup succeeded" -e "warning" https://push.ixvd.net/infra-backups
else
/neb/common/ntfy.sh -p "urgent" -m "backup failed" -e "warning,skull" https://push.ixvd.net/infra-backups
fi