Skip to content

Commit

Permalink
ignore exit code 1 (changed files) borgbackup/borg#6622
Browse files Browse the repository at this point in the history
  • Loading branch information
tux2linux committed Sep 8, 2023
1 parent 93ad3fe commit 93f0ec2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions templates/usr/local/sbin/borgbackup-create.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ echo -e "\n\nBACKUP END $(date +%d_%m_%y-%H_%M_%S)\n\n" >> $logfile

echo borg_backup_exit_status $borg_backup_exit_status > /var/lib/prometheus-node-textfile-collector/logs/borg_backup_exit_status.prom

if [[ "$borg_backup_exit_status" == "0" ]]; then
# https://github.com/borgbackup/borg/issues/6622
if [[ "$borg_backup_exit_status" == "0" ]] || [[ "$borg_backup_exit_status" == "1" ]]; then
echo borg_last_successful_backup $(date "+%s") > /var/lib/prometheus-node-textfile-collector/logs/borg_backup.prom
fi

# send message to monitoring if there is a problem
if [[ "$borg_backup_exit_status" != "0" ]] || [[ "$borg_hook_general_exit_status" != "0" ]]; then
elif [[ "$borg_backup_exit_status" != "0" ]] && [[ "$borg_backup_exit_status" != "1" ]] || [[ "$borg_hook_general_exit_status" != "0" ]]; then
echo "Error running borg backup!"
echo "borg_backup_exit_status $borg_backup_exit_status"
echo "borg_hook_general_exit_status $borg_hook_general_exit_status"
Expand Down

0 comments on commit 93f0ec2

Please sign in to comment.