Linux · Internet
rsync
rsync is a command-line tool for efficiently syncing files and directories locally or over a network.
- License
- GPL-3.0
- Latest version
- 3.5.1
What is rsync?
rsync has been a core Linux tool since the late 1990s, known for its efficient delta-sync algorithm that transfers only changed parts of files. It's mature, stable, and included by default in most distributions. Its reliability and network efficiency have made it a standard in system administration and backup workflows.
It's best for users comfortable with the terminal, including system admins, developers, and Linux-savvy users who need precise control over file transfers. While it lacks a GUI, its scripting capability makes it ideal for automation. Not aimed at casual users who prefer point-and-click.
Compared to Resilio Sync, rsync is not peer-to-peer and doesn’t sync in real time. It requires manual or scripted execution, not continuous background syncing. However, it’s more predictable and transparent, especially over SSH. It feels less 'automatic' but far more controllable and secure when used correctly.
Best for: Automating secure, efficient file synchronization between trusted systems.
Key features of rsync
- Efficient delta syncing reduces bandwidth use
- Supports local and remote transfers over SSH
- Preserves permissions, symlinks, and timestamps
- Can resume interrupted transfers
- Filter rules for include/exclude patterns
- Scriptable and ideal for cron automation
- Works over any shell-accessible connection
Pros
- Extremely reliable and battle-tested
- Minimal network usage due to delta algorithm
- Available on nearly every Unix-like system
- Secure when used with SSH
- Highly scriptable for automation
Cons
- No GUI — entirely command-line driven
- Not designed for real-time syncing
- Steeper learning curve for beginners
- No built-in peer discovery or encryption beyond SSH
Windows programs rsync replaces
How to install rsync on Linux
sudo apt install rsyncsudo apt install rsyncsudo dnf install rsyncsudo pacman -S rsyncsudo zypper install rsyncTips for Windows users
Unlike Resilio Sync, rsync doesn’t run as a background service by default. You’ll need to run it manually or via cron. It doesn’t use a proprietary file format — just regular files and directories. Use SSH keys for passwordless auth. Replace Resilio’s automatic sync with scripts calling rsync with --archive and --delete flags as needed.
rsync: frequently asked questions
Can rsync sync files in real time like Resilio?
No, rsync is not real-time. You must trigger it manually or via a scheduler like cron. For automatic syncing, combine it with inotify tools like 'inotifywait'.
Is rsync secure for transferring over the internet?
Yes, when used over SSH, rsync encrypts data and verifies hosts. Never use unencrypted protocols like rsh in production environments.
How do I resume a failed rsync transfer?
Use the --partial or --partial-dir option to keep incomplete files. Rerunning the same command will resume from where it left off.
Can rsync sync two directories on the same machine?
Yes. rsync works locally too. Use it to mirror directories with rsync -a /source/ /dest/ for efficient local copies.
Updated