15 lines
No EOL
402 B
Bash
15 lines
No EOL
402 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 "pruning old backups..."
|
|
if restic \
|
|
-r "sftp://ixvd_backup_storage//backups/restic-$(hostname)" \
|
|
-p "/etc/ixvd/secrets/restic/$(hostname).secret" \
|
|
prune; then
|
|
notify -m "pruning succeeded"
|
|
else
|
|
notify -m "prune failed" -e "warning,skull"
|
|
fi |