Add more output to mirror.

This commit is contained in:
Darren 'Tadgy' Austin 2026-05-21 18:27:10 +01:00
commit 1ced1c286d

5
mirror
View file

@ -13,7 +13,7 @@ MAX_RUNS="3" # Maximum number of runs
IPV4="5.101.171.215"
DATADIR="/data/depository"
RSYNC_COMMAND="/usr/bin/rsync"
RSYNC_REMOTE_OPTIONS=("--address=$IPV4" '--no-motd' '--contimeout=30' '--timeout=60 -4 -aH' '--chmod=go-w,+rX' '--partial' '--partial-dir=.rsync-tmp' '--delete-delay' '--delay-updates')
RSYNC_REMOTE_OPTIONS=('-4' "--address=$IPV4" '--no-motd' '--contimeout=30' '--timeout=60' '-aH' '--chmod=go-w,+rX' '--partial' '--partial-dir=.rsync-tmp' '--delete-delay' '--delay-updates')
RSYNC_LOCAL_OPTIONS=('-aH' '--chmod=go-w,+rX' '--partial' '--partial-dir=.rsync-tmp' '--delay-updates')
# RSYNC_VERBOSE=('--verbose' '--human-readable')
# RSYNC_VERBOSE=('--progress' '--verbose' '--stats' '--human-readable')
@ -313,6 +313,7 @@ for RUN in $(seq -s' ' 1 "$MAX_RUNS"); do
done
echo "INFO: Finished processing of $VAR at $(printf "%(%c)T")." >&2
done
echo "INFO: End of rsync run $RUN at $(printf "%(%c)T")" >&2
# Mirrors synced using lftp
echo "INFO: Begining lftp run $RUN at $(printf "%(%c)T")" >&2
@ -364,6 +365,8 @@ for RUN in $(seq -s' ' 1 "$MAX_RUNS"); do
done
echo "INFO: Finished processing of $VAR at $(printf "%(%c)T")." >&2
done
echo "INFO: End of lftp run $RUN at $(printf "%(%c)T")" >&2
FINISH_TIME="$(printf "%(%s)T")"
if (( (FINISH_TIME - START_TIME) > MAX_PROC )); then
echo "WARNING: Max processing time (${MAX_PROC}s) exceeded - re-running syncs." >&2