title: How to make rsync read SRC from STDIN?
body: <p>I want to dump my MySQL database and make daily backups with <code>rsync</code>.</p>
  
  <p>First approach I came up with is something like <code>mysqldump -ufoo -pbar baz &gt; /var/tmp/baz.sql &amp;&amp; rsync /var/tmp/baz.sql /backup/ &amp;&amp; rm /var/tmp/baz.sql</code>.</p>
  
  <p>Then I started to wonder if it is possible not to use the temporary file <code>/var/tmp/baz.sql</code>, but instead to pipe the output of <code>mysqldump</code> directly to <code>rsync</code>.</p>
  
  <p>To be more specific, what I want is quite similar to a command line which we use to update the GPG key for apt in Ubuntu: <code>gpg --export --armor CE49EC21 | sudo apt-key add -</code>, where the receiver of the pipe supports this '<code>-</code>' argument indicating it'll read from <code>stdin</code>. I suppose <code>rsync</code> doesn't have a similar argument. But I wanna know if there is a workaround.</p>