diff --git a/bundles/backup-client/files/generate-backup b/bundles/backup-client/files/generate-backup index 28ef49d..3fd9d7d 100644 --- a/bundles/backup-client/files/generate-backup +++ b/bundles/backup-client/files/generate-backup @@ -62,10 +62,13 @@ trap "on_exit" EXIT # redirect stdout and stderr to logfile prepare_and_cleanup_logdir -logfile="$logdir/backup--$(date '+%F--%H-%M-%S')--$$.log.gz" -echo "All log output will go to $logfile" | logger -it backup-client -exec > >(gzip >"$logfile") -exec 2>&1 +if [[ -z "$DEBUG" ]] +then + logfile="$logdir/backup--$(date '+%F--%H-%M-%S')--$$.log.gz" + echo "All log output will go to $logfile" | logger -it backup-client + exec > >(gzip >"$logfile") + exec 2>&1 +fi # this is where the real work starts ts_begin=$(date +%s)