17 lines
No EOL
431 B
Bash
17 lines
No EOL
431 B
Bash
#!/bin/sh
|
|
|
|
ntfy() {
|
|
sh /neb/common/ntfy.sh -s "/neb/secrets/ntfy/ixvd-backups" -u "https://push.ixvd.net/ixvd-backups" "$@"
|
|
}
|
|
|
|
ntfy -m "performing backup..."
|
|
if restic \
|
|
-r "sftp://ixvd_backup_storage//backups/restic-$(hostname)" \
|
|
-p "/neb/secrets/restic/$(hostname).secret" \
|
|
backup \
|
|
--tag auto \
|
|
/srv /home /etc; then
|
|
ntfy -m "backup succeeded"
|
|
else
|
|
ntfy -m "backup failed" -e "warning,skull"
|
|
fi |