Compare commits

...

2 Commits

Author SHA1 Message Date
391ca1d275
version bump
All checks were successful
continuous-integration/drone/tag Build is passing
2025-02-01 14:09:14 +01:00
cd6013461c
added flag IGNORE_TARGET_UNREACHABLE 2025-02-01 14:09:06 +01:00
3 changed files with 20 additions and 10 deletions

View File

@ -24,6 +24,7 @@ fi
HEALTHCHECK_URL=${HEALTHCHECK_URL:-http://127.0.0.1}
HEALTHCHECK_ENABLE=${HEALTHCHECK_ENABLE:-false}
FAIL_IF_TARGET_UNREACHABLE=${FAIL_IF_TARGET_UNREACHABLE:-true}
IGNORE_TARGET_UNREACHABLE=${IGNORE_TARGET_UNREACHABLE:-false}
CURLOPTS=(-fsS -m 10 --retry 5)
if [[ ! -d /run/btrbk ]] ; then
@ -66,6 +67,7 @@ SSHUSER=$(echo "${SSHUSER}" | sed -r 's/.*ssh_user[\ \t]+//g')
SSH_OK=$(ssh -i "${IDENTITYFILE}" "${SSHUSER}@${HOST}" "which btrfs")
if [[ "${IGNORE_TARGET_UNREACHABLE}" = "false" ]] ; then
if [[ "${SSH_OK}" = "" ]] ; then
echo "Warning: exiting because of backup destination unreachable" | tee -a "${LOGFILE}"
if [[ "${HEALTHCHECK_ENABLE}" = "true" ]] ; then
@ -78,6 +80,7 @@ if [[ "${SSH_OK}" = "" ]] ; then
exit 0
fi
fi
fi
echo "Start backup: $(date||true)" | tee -a "${LOGFILE}"
if [[ "${HEALTHCHECK_ENABLE}" = "true" ]] ; then

View File

@ -1,3 +1,4 @@
HEALTHCHECK_ENABLE=true
HEALTHCHECK_URL=https://my.selfhosted.healthcheck.com/ping/e48e4add-c17c-467c-9a91-7b245ad57fe8
FAIL_IF_TARGET_UNREACHABLE=true
IGNORE_TARGET_UNREACHABLE=false

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
btrbk-cron (0.4.3) stable; urgency=medium
* added flag IGNORE_TARGET_UNREACHABLE
-- Paolo Asperti <paolo@asperti.com> Sat, 01 Feb 2025 14:06:08 +0100
btrbk-cron (0.4.2) stable; urgency=medium
* gather all logs