title: How does `scp` differ from `rsync`?
body: <p>An article about <a href="https://www.digitalocean.com/community/articles/how-to-host-ghost-with-nginx-on-digitalocean" rel="noreferrer">setting up Ghost blogging</a> says to use <code>scp</code> to copy from my local machine to a remote server:</p>
  
  <pre><code>scp -r ghost-0.3 root@*your-server-ip*:~/
  </code></pre>
  
  <p>However, <a href="http://railscasts.com/episodes/339-chef-solo-basics?view=asciicast" rel="noreferrer">Railscast 339: Chef Solo Basics</a> uses <code>scp</code> to copy in the opposite direction (from the remote server to the local machine):</p>
  
  <pre><code>scp -r root@178.xxx.xxx.xxx:/var/chef .
  </code></pre>
  
  <p>In the same Railscast, when the author wants to copy files to the remote server (same direction as the first example), he uses <code>rsync</code>:</p>
  
  <pre><code>rsync -r . root@178.xxx.xxx.xxx:/var/chef
  </code></pre>
  
  <p>Why use the <code>rsync</code> command if <code>scp</code> will copy in both directions? How does <code>scp</code> differ from <code>rsync</code>?</p>