Difference between scp and rsync?

Title pretty much says it all. If I have a folder (mydir/) on server1.com, and want to copy it to a parent folder on server2.com, then what is the difference (performance, security, capabilities, etc.) between:

scp mydir/ server2.com:/some/path/

and...

rsync -avz mydir/ :/some/path/

Thanks in advance!

1

1 Answer

1) Performance

scp will be faster

2) Security

scp is more secure, but if you were to use rsync -avz -e ssh, then rsync would be as secure

3) Capability

rsync can 'sync' the two copies, so lets say if your scp stopped in middle of the transfer for some reason (network issue lets say), you could use rsync to complete the transfer. scp will simply overwrite.

alias scpresume="rsync --partial --progress --rsh=ssh"

rsync can also exclude certain subdirectories/files using the --exclude flag, scp can't do that.

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like