will now log the exit code upon replication failure

This commit is contained in:
Tamás Gérczei 2019-08-08 09:52:44 +02:00
parent f14c940159
commit a6b5635b00
1 changed files with 2 additions and 1 deletions

View File

@ -132,7 +132,8 @@ function backup() {
fi
done
else
logger -t $(basename ${0%.sh}) -p user.notice "failed to replicate ${NEWSNAP} to ${TARGET}:${SAVETO}, no aging"
MY_EXIT_CODE=$?
logger -t $(basename ${0%.sh}) -p user.notice "failed to replicate ${NEWSNAP} (rc: $MY_EXIT_CODE) to ${TARGET:-local}:${SAVETO}, no aging"
fi
# re-evaluate snapshot data usage