push rsync log file with the canary file
This commit is contained in:
parent
17c2868fee
commit
a957498b6f
|
@ -769,13 +769,14 @@ build_rsync_main_cmd() {
|
||||||
# output final command
|
# output final command
|
||||||
echo "${cmd}"
|
echo "${cmd}"
|
||||||
}
|
}
|
||||||
build_rsync_canary_cmd() {
|
build_rsync_report_cmd() {
|
||||||
# Rsync command
|
# Rsync command
|
||||||
cmd="$(command -v rsync)"
|
cmd="$(command -v rsync)"
|
||||||
# Rsync options
|
# Rsync options
|
||||||
cmd="${cmd} --rsh='ssh -p ${SSH_PORT} -o \"ConnectTimeout ${SSH_CONNECT_TIMEOUT}\"'"
|
cmd="${cmd} --rsh='ssh -p ${SSH_PORT} -o \"ConnectTimeout ${SSH_CONNECT_TIMEOUT}\"'"
|
||||||
# Rsync local source
|
# Rsync local source
|
||||||
cmd="${cmd} ${CANARY_FILE}"
|
cmd="${cmd} ${CANARY_FILE}"
|
||||||
|
cmd="${cmd} ${RSYNC_LOGFILE}"
|
||||||
# Rsync remote destination
|
# Rsync remote destination
|
||||||
cmd="${cmd} root@${SSH_SERVER}:/var/backup/"
|
cmd="${cmd} root@${SSH_SERVER}:/var/backup/"
|
||||||
|
|
||||||
|
@ -896,13 +897,13 @@ sync_tasks() {
|
||||||
rc=${E_SYNCFAILED}
|
rc=${E_SYNCFAILED}
|
||||||
else
|
else
|
||||||
# Build the canary Rsync command
|
# Build the canary Rsync command
|
||||||
rsync_canary_cmd=$(build_rsync_canary_cmd)
|
rsync_report_cmd=$(build_rsync_report_cmd)
|
||||||
|
|
||||||
# … log it
|
# … log it
|
||||||
log "SYNC_TASKS - Rsync canary command : ${rsync_canary_cmd}"
|
log "SYNC_TASKS - Rsync report command : ${rsync_report_cmd}"
|
||||||
|
|
||||||
# … execute it
|
# … execute it
|
||||||
eval "${rsync_canary_cmd}"
|
eval "${rsync_report_cmd}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
log "STOP SYNC_TASKS - server=${server}"
|
log "STOP SYNC_TASKS - server=${server}"
|
||||||
|
|
Loading…
Reference in a new issue