Add alert when backup takes a long time

This commit is contained in:
Paul-Henri Froidmont 2018-02-13 12:10:02 +01:00
parent f318e42f8c
commit f778bfb44e
4 changed files with 29 additions and 2 deletions

View file

@ -1,6 +1,8 @@
#!/bin/sh
set -e
touch /backups/backup-ongoing
REPOSITORY=ssh://backup@phf.ddns.net:2222/./backup
export BORG_PASSPHRASE='{{backup_borg_passphrase}}'
@ -53,6 +55,7 @@ borg prune -v --list ${REPOSITORY} --prefix '{hostname}-' \
# Unset the password
export BORG_PASSPHRASE=""
rm -f /backups/backup-ongoing
touch /backups/backup-ok
exit 0