feat: even better prios

This commit is contained in:
Strix 2023-10-18 23:12:25 +02:00
parent 0777750de1
commit 58e6fe4c6a
No known key found for this signature in database
GPG key ID: 49B2E37B8915B774
3 changed files with 7 additions and 7 deletions

View file

@ -4,14 +4,14 @@ ntfy() {
sh /opt/scripts/ntfy.sh -s "/etc/ixvd/secrets/ntfy/ixvd-backups" -u "https://push.ixvd.net/ixvd-backups" "$@" sh /opt/scripts/ntfy.sh -s "/etc/ixvd/secrets/ntfy/ixvd-backups" -u "https://push.ixvd.net/ixvd-backups" "$@"
} }
ntfy -m "performing backup..." ntfy -m "performing backup..." -p "low"
if restic \ if restic \
-r "/mnt/backups/restic/$(hostname)" \ -r "/mnt/backups/restic/$(hostname)" \
-p "/etc/ixvd/secrets/restic/$(hostname).secret" \ -p "/etc/ixvd/secrets/restic/$(hostname).secret" \
backup \ backup \
--tag auto \ --tag auto \
/srv /home /etc; then /srv /home /etc; then
ntfy -m "backup succeeded" ntfy -m "backup succeeded" -p "low"
else else
ntfy -m "backup failed" -e "warning,skull" -p "urgent" ntfy -m "backup failed" -e "warning,skull" -p "urgent"
fi fi

View file

@ -4,7 +4,7 @@ ntfy() {
sh /opt/scripts/ntfy.sh -s "/etc/ixvd/secrets/ntfy/ixvd-backups" -u "https://push.ixvd.net/ixvd-backups" "$@" sh /opt/scripts/ntfy.sh -s "/etc/ixvd/secrets/ntfy/ixvd-backups" -u "https://push.ixvd.net/ixvd-backups" "$@"
} }
ntfy -m "forgetting old backups..." ntfy -m "forgetting old backups..." -p "low"
if restic \ if restic \
-r "/mnt/backups/restic/$(hostname)" \ -r "/mnt/backups/restic/$(hostname)" \
-p "/etc/ixvd/secrets/restic/$(hostname).secret" \ -p "/etc/ixvd/secrets/restic/$(hostname).secret" \
@ -15,7 +15,7 @@ if restic \
--keep-weekly 20 \ --keep-weekly 20 \
--keep-monthly 6 \ --keep-monthly 6 \
--keep-yearly 10; then --keep-yearly 10; then
ntfy -m "forget succeeded" ntfy -m "forget succeeded" -p "min"
else else
ntfy -m "forget failed" -e "warning,skull" -p "urgent" ntfy -m "forget failed" -e "warning,skull" -p "urgent"
fi fi

View file

@ -4,12 +4,12 @@ ntfy() {
sh /opt/scripts/ntfy.sh -s "/etc/ixvd/secrets/ntfy/ixvd-backups" -u "https://push.ixvd.net/ixvd-backups" "$@" sh /opt/scripts/ntfy.sh -s "/etc/ixvd/secrets/ntfy/ixvd-backups" -u "https://push.ixvd.net/ixvd-backups" "$@"
} }
ntfy -m "pruning old backups..." -p "urgent" ntfy -m "pruning old backups..."
if restic \ if restic \
-r "/mnt/backups/restic/$(hostname)" \ -r "/mnt/backups/restic/$(hostname)" \
-p "/etc/ixvd/secrets/restic/$(hostname).secret" \ -p "/etc/ixvd/secrets/restic/$(hostname).secret" \
prune; then prune; then
notify -m "pruning succeeded" ntfy -m "pruning succeeded" -p "min"
else else
notify -m "prune failed" -e "warning,skull" -p "urgent" ntfy -m "prune failed" -e "warning,skull" -p "urgent"
fi fi