added the trap and info function
This commit is contained in:
parent
e5f5246010
commit
42600fff64
@ -10,6 +10,12 @@ fi
|
||||
|
||||
source "$HOME/.borgbackup.env"
|
||||
|
||||
|
||||
# some helpers and error handling:
|
||||
info() { printf "\n%s %s\n\n" "$( date )" "$*" >&2; }
|
||||
trap 'echo $( date ) Backup interrupted >&2; exit 2' INT TERM
|
||||
|
||||
|
||||
info "Starting backup"
|
||||
|
||||
# Backup the most important directories into an archive named after
|
||||
|
Loading…
Reference in New Issue
Block a user