title: bash: rsync with options as variable
body: <p>I am writing bash script, which in some part will rsync files over ssh. Unfortunately I am facing problem with keeping rsync options as variable. Please take a look below:</p>
  
  <pre><code>    # variables
      directory="/etc"
      backupDirectory="/backup"
      incrementalBackup="/incremental"
      options="-a -e 'ssh -p 10022' -b --backup-dir=$incrementalBackup --delete"
      # rsync
      rsync $options user@server:$directory $backupDirectory
  </code></pre>
  
  <p>Unfortunately above script fails with rsync error:</p>
  
  <pre><code>    Unexpected remote arg: user@server:/etc
      rsync error: syntax or usage error (code 1) at main.c(1201) [sender=3.0.6]
  </code></pre>
  
  <p>What I saw during script debugging is the fact, that ssh options ('ssh -p 10022') are treated as rsync options.
  The question is how to pass correctly those additional ssh settings into rsync?
  Thanks in advance for a tip.</p>