An article about setting up Ghost blogging says to use scp
to copy from my local machine to a remote server:
scp -r ghost-0.3 root@*your-server-ip*:~/
However, Railscast 339: Chef Solo Basics uses scp
to copy in the opposite direction (from the remote server to the local machine):
scp -r root@178.xxx.xxx.xxx:/var/chef .
In the same Railscast, when the author wants to copy files to the remote server (same direction as the first example), he uses rsync
:
rsync -r . root@178.xxx.xxx.xxx:/var/chef
Why use the rsync
command if scp
will copy in both directions? How does scp
differ from rsync
?