#!/bin/sh ntfy() { sh /opt/ixvd/ntfy.sh -s "/neb/secrets/ntfy/ixvd-backups" -u "https://push.ixvd.net/ixvd-backups" "$@" } ntfy -m "forgetting old backups..." if restic \ -r "sftp://ixvd_backup_storage//$(hostname)" \ -p "/etc/ixvd/secrets/restic/$(hostname).secret" \ forget \ --keep-last 10 \ --keep-tag keep \ --keep-daily 20 \ --keep-weekly 20 \ --keep-monthly 6 \ --keep-yearly 10; then ntfy -m "forget succeeded" else ntfy -m "forget failed" -e "warning,skull" fi