Exclude named profiles from merge auto-promote; add RSYNC_MERGE_ENABLED toggle

This commit is contained in:
Gmer4Lfe
2026-06-14 21:34:49 -04:00
parent 11f3492d9d
commit 554822fc6a
2 changed files with 16 additions and 2 deletions
+5 -2
View File
@@ -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)