From 86f00467977fea63954596adefac244ef078944d Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Fri, 13 Jan 2023 18:17:54 +0100 Subject: [PATCH] send rsync full log file if it exists --- client/zzz_evobackup | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/client/zzz_evobackup b/client/zzz_evobackup index 18d04be..ba46469 100755 --- a/client/zzz_evobackup +++ b/client/zzz_evobackup @@ -974,10 +974,18 @@ sync_tasks() { # Rsync options rsync_report_args+=(--rsh "ssh -p ${SSH_PORT} -o 'ConnectTimeout ${SSH_CONNECT_TIMEOUT}'") # Rsync local source - rsync_report_args+=("${RSYNC_STATSFILE}") if [ "${#mtree_files[@]}" -gt 0 ]; then + # send mtree files if there is any rsync_report_args+=("${mtree_files[@]}") fi + if [ -f "${RSYNC_LOGFILE}" ]; then + # send rsync full log file if it exists + rsync_report_args+=("${RSYNC_LOGFILE}") + fi + if [ -f "${RSYNC_STATSFILE}" ]; then + # send rsync stats log file if it exists + rsync_report_args+=("${RSYNC_STATSFILE}") + fi # Rsync remote destination rsync_report_args+=("root@${SSH_SERVER}:/var/log/")