scp vs rsync
People often think rsync is just a faster scp, since both copy files to a server. Both go over SSH, but scp sends the whole file every time. rsync checks what is already there first, and sends only what changed. For one file once, scp is fine. For a big folder you copy again and again, rsync wins.
scp
A command that copies a file to or from a server. It goes over SSH.
scp copies files between two computers over SSH. You name the file, then where it should go, with a colon after the server's address. It uses the same login and keys as ssh. It copies the whole file every time. Since OpenSSH 9.0 it moves the data with the SFTP protocol underneath.
rsync
A tool that makes two folders match. It sends only what changed.
rsync copies files and folders so that two places end up the same. It first checks what is already there. Then it sends only the files, or parts of files, that changed. It usually runs over SSH. That makes the second copy of a big folder far faster than the first.
In one line
- scp
- A command that copies a file to or from a server. It goes over SSH.
- rsync
- A tool that makes two folders match. It sends only what changed.