From 395583786f5adeb3a2a358f5a9d0ec9e5cd180b0 Mon Sep 17 00:00:00 2001 From: clover caruso Date: Wed, 10 Jun 2026 10:14:47 -0700 Subject: [PATCH] fix(clover): backup script hang fixes --- users/clover/sandwich/home.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/users/clover/sandwich/home.nix b/users/clover/sandwich/home.nix index 05149234e80ae18875d128884dd1aab178e480d6..0b82c25e67b1dd4b860b99b0e0efe8a6212332ff 100644 --- a/users/clover/sandwich/home.nix +++ b/users/clover/sandwich/home.nix @@ -18,7 +18,8 @@ let # Dedicated passphraseless key so the launchd job runs unattended; the # interactive key keeps its passphrase. IdentitiesOnly stops ssh from # offering the passphrased key first. - SSH=(ssh -i "$HOME/.ssh/id_sandwich_backup" -o IdentitiesOnly=yes -o BatchMode=yes) + SSH=(ssh -i "$HOME/.ssh/id_sandwich_backup" -o IdentitiesOnly=yes -o BatchMode=yes + -o ConnectTimeout=30 -o ServerAliveInterval=30 -o ServerAliveCountMax=4) # Single-instance guard: the initial sync takes hours, far longer than the # hourly interval. mkdir is atomic; recover if a previous run died uncleanly. @@ -38,7 +39,7 @@ let # machine; anything else is a real failure and aborts before the snapshot. rsync_one() { local rc=0 - rsync -a --delete --partial --human-readable --stats \ + rsync -a --delete --partial --timeout=600 --human-readable --stats \ -e "''${SSH[*]}" \ --exclude '.DS_Store' \ --exclude '.Spotlight-V100' \ -- 2.54.0