do_rsync() {
local remote_host="$1"; shift
- if [ "$*" = "--server --sender -vlogDtprze.iLsf . -new-/" ] ; then
+ if [ "$*" = "--server --sender -vltrze.iLsf --safe-links . -new-/" ] ; then
serve_dir "$remote_host" "$BASEDIR/current-push"
- elif [ "$*" = "--server --sender -vlogDtprze.iLsf . -live-/" ] ; then
+ elif [ "$*" = "--server --sender -vltrze.iLsf --safe-links . -live-/" ] ; then
local p="$BASEDIR/current-live"
info "host $remote_host wants $p, acquiring lock"
lock 200 "$p" 0
echo "$0: Updating master copy of $component..."
rsync --delete \
- -tr \
+ -trz \
+ --links --safe-links \
--link-dest="$tgt" \
"$src/." "$tmpdir_new/."
echo "$0: Done. Committing."
if [ -z "$SYNC_SOURCE" ]; then usage >&2; exit 1; fi
RSYNC="rsync"
-RSYNC_BASE_OPTIONS="-avz --delete"
+RSYNC_BASE_OPTIONS="-rtvz --delete --links --safe-links"
RSYNC_SSH_OPTIONS="ssh -o AddressFamily=inet -o BatchMode=yes"
LOGDIR="$HOME/logs"
if [ -e "$COMPONENTLIST" ]; then
for path in $(awk -v host="$(hostname -f)" '$2 == host {print $3}' $COMPONENTLIST); do
- allowed_rsyncs+=("--server --sender -tre.iLsf . $path/.")
+ allowed_rsyncs+=("--server --sender -ltrze.iLsf --safe-links . $path/.")
done
fi
for cmd_idx in ${!allowed_rsyncs[*]}; do