Exclude named profiles from merge auto-promote; add RSYNC_MERGE_ENABLED toggle
This commit is contained in:
+5
-2
@@ -271,8 +271,11 @@ check_remote_disks "$DIRECTORY"
|
||||
|
||||
# ── Merge-run pre-scan ────────────────────────────────────────────────────────────────────────
|
||||
# Auto-promote to merge mode when ≥75% of remote's top-level entries exist locally.
|
||||
# Skipped when --merge-run is already set or --seed is active (remote was just created).
|
||||
if [[ "$MERGE_RUN" == false && "$SEED" == false ]]; then
|
||||
# Skipped when: --merge-run is already set, --seed is active, a named profile is resolved,
|
||||
# or RSYNC_MERGE_ENABLED=false in master.conf.
|
||||
if [[ "$MERGE_RUN" == false && "$SEED" == false \
|
||||
&& "${RSYNC_MERGE_ENABLED:-true}" != "false" \
|
||||
&& -z "${PROFILE_RSYNC_OPTS[$PROFILE_NAME]+x}" ]]; then
|
||||
_remote_top=$(ssh -i "$SSH_KEY" -o ConnectTimeout=10 -o BatchMode=yes \
|
||||
root@"$REMOTE_SERVER" "ls -1A '$DIRECTORY' 2>/dev/null | sort" 2>/dev/null)
|
||||
_remote_count=$(echo "$_remote_top" | grep -c . 2>/dev/null || echo 0)
|
||||
|
||||
Reference in New Issue
Block a user