title: Rsync over SSH - timeout in ssh or rsync?
body: <p>I'm dealing with a crappy ISP that resets my WAN connection at random points while my script is running. I want the transfer to survive this reset and go on. I manually launch this script vs using cron / launchd currently.</p>
  
  <p>I have a fairly basic script as shown below:</p>
  
  <pre><code>rsync -rltv --progress --partial -e "ssh -i &lt;key&gt; -o ConnectTimeout=300" &lt;remotedir&gt; &lt;localdir&gt;
  </code></pre>
  
  <p>Am I better off putting the timeout in the rsync section instead? </p>
  
  <p>For example:</p>
  
  <pre><code>rsync -rltv --progress--partial --timeout=300 -e "ssh -i &lt;key&gt;" &lt;remotedir&gt; &lt;localdir&gt;
  </code></pre>
  
  <p>Thanks!</p>