Same timeout for Rsync than SSH
This commit is contained in:
parent
242153b472
commit
24481ca37e
|
@ -304,6 +304,9 @@ if [ "${SYNC_TASKS}" = "1" ]; then
|
||||||
# /!\ DO NOT USE COMMENTS in the rsync command /!\
|
# /!\ DO NOT USE COMMENTS in the rsync command /!\
|
||||||
# It breaks the command and destroys data, simply remove (or add) lines.
|
# It breaks the command and destroys data, simply remove (or add) lines.
|
||||||
|
|
||||||
|
# Remote shell command
|
||||||
|
RSH_COMMAND="ssh -p ${SSH_PORT} -o 'ConnectTimeout ${SSH_CONNECT_TIMEOUT}'"
|
||||||
|
|
||||||
rsync -avzh --stats --delete --delete-excluded --force --ignore-errors --partial \
|
rsync -avzh --stats --delete --delete-excluded --force --ignore-errors --partial \
|
||||||
--exclude "lost+found" \
|
--exclude "lost+found" \
|
||||||
--exclude ".nfs.*" \
|
--exclude ".nfs.*" \
|
||||||
|
@ -340,7 +343,7 @@ if [ "${SYNC_TASKS}" = "1" ]; then
|
||||||
/var \
|
/var \
|
||||||
/home \
|
/home \
|
||||||
/srv \
|
/srv \
|
||||||
-e "ssh -p ${SSH_PORT}" \
|
-e "${RSH_COMMAND}" \
|
||||||
"root@${SSH_SERVER}:/var/backup/" \
|
"root@${SSH_SERVER}:/var/backup/" \
|
||||||
| tail -30 >> $LOGFILE
|
| tail -30 >> $LOGFILE
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue