13 lines
502 B
Bash
13 lines
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
|