Rsync vs SCP

Comparison between Rsync vs SCP.

Rsync is a network-enabled utility for efficiently moving, transferring, and synchronizing files between a computer and a storage device. It compares if there are differences and only transfers those differences.

SCP is a means of securely transferring files between two devices on a network. SCP only copies the files or directories we select. It uses SSH for improved security.

Rsync vs SCP differences

Copies only the files that have been changed.uses SSH to copy only the files and directories selected.
In case of a Rsync session interruption, you can resume it by typing the same command, and Rsync will automatically restart the transfer where it stopped.Its command line tool does not have the resume option in case a session gets interrupted from lost network connections .
Tends to verify automatically if a file or directory has been transferred correctly.It does not verify if files or directories have been done correctly. This might bring about corruption when transferring large files.
Copies files or directories over a network or locally; on the other hand, it employs a special delta transfer algorithm and just a few optimizations to make the operation faster.It first reads the source file before writing it to the destination. It does this by performing a plane linear copy over a file.
Must travel over SSH to be secure.It is always secure to transfer files or directories.
In terms of performance, Rsync is comparatively more optimized and fast(speed-wise).Scp is relatively less optimized and slower.
Allows us to synchronize remote folders.Provides a cp-like method to copy files or directories from one device to a remote device over a secure SSH connection.

Example of Rsync and SCP commands

Here is the syntax used in syncing two local files.


$ rsync [Option] [Source Folder] [Destination Folder]