rsync vs scp: Which One Should You Use?

Both copy files over SSH. rsync sends only what changed; scp sends everything, every time.

Side by side

rsync scp
Transfers only changes Yes — block-level delta algorithm No — resends the whole file
Resume interrupted transfer Yes (-P) No, starts over
Directories Native, with -a preserving everything Needs -r, loses some metadata
Progress display Yes (-P), including totals Basic per-file
Delete extraneous files Yes (--delete) for true mirroring No
Dry run Yes (-n) — preview before acting No
Exclusions Yes (--exclude, repeatable) No
Installed everywhere by default Usually, but not guaranteed Yes, ships with OpenSSH
Command length for one file rsync -av file host:/dst/ scp file host:/dst/

Which one, when

Sending one file to a server, once

Use scp

Shorter to type and there is nothing to optimise: a single file with no previous version at the destination transfers identically either way.

$ scp report.pdf user@server:/tmp/

Deploying a site or app

Use rsync

Only changed assets travel, --delete removes files you deleted locally, and --exclude keeps .git and node_modules out. The second deploy takes seconds instead of minutes.

$ rsync -avz --delete --exclude=".git" build/ user@server:/var/www/app/

Nightly backups

Use rsync

Incremental by nature. After the first run only the differences cross the network, which is what makes daily backups practical at all.

$ rsync -a --delete ~/data/ backup@nas:/backups/data/

Large file over an unreliable connection

Use rsync

With -P it resumes where it stopped. scp starts from zero, which on a 4 GB file and hotel wifi is the difference between finishing and giving up.

$ rsync -avP big.iso user@server:/data/

Copying between two remote servers

Use either, carefully

scp does it in one command but relays through your machine. For anything large, SSH into one server and run rsync from there so the data goes directly.

$ ssh serverA "rsync -avz /data/ user@serverB:/data/"

Gotchas worth knowing

Frequently asked questions

Is rsync faster than scp?

On the first transfer of new data, they are roughly equal — the bytes have to cross either way. On every subsequent run rsync is dramatically faster, because it only sends what changed.

Does rsync need to be installed on both machines?

Yes, on both ends. That is the one practical advantage scp keeps: it works anywhere OpenSSH is installed, which is everywhere.

Is scp deprecated?

The old SCP protocol was retired, but the scp command remains and now runs over SFTP. It is not going away; it is simply the less capable of the two.

Which is more secure?

Neither — both ride the same SSH transport with the same encryption and the same key authentication. Security is not a factor in this choice.

Full guides for both

rsync

Sync directories locally or over SSH, transferring only what changed.

scp

The quickest way to move a file to or from a remote machine.

ssh

Log into remote machines, run remote commands, use keys instead of passwords, and tunnel ports.

Put it into practice

Copy files to or from a remote server

Move files between machines with scp and rsync, over the same encrypted connection.

Other comparisons

curl vs wget

curl is an HTTP client for talking to services; wget is a downloader for retrieving files.

sed vs awk

sed edits lines; awk understands columns. Substitution is sed, computation is awk.

symbolic link vs hard link

A symlink stores a path and can break; a hard link is a second real name for the same file.

grep vs ripgrep (rg)

grep is everywhere; ripgrep is dramatically faster on code and respects .gitignore by default.