5 min read - May 24, 2025
Learn how to use rsync on Linux to sync files, copy data between servers, and automate backups. This powerful command-line tool is essential for developers and sysadmins.
Rsync is one of the most efficient and reliable file transfer tools available on Unix-like systems. Whether you're syncing servers, copying backups, or migrating between VPS providers, rsync is often the smartest tool for the job.
This post breaks down what rsync does, why it’s better than basic copy tools, and how to use it with confidence.
Rsync is a command-line tool for syncing files and directories between two locations. It can work:
Unlike scp
or cp
, rsync compares source and destination, only sending differences — which makes it incredibly bandwidth- and time-efficient.
-z
flag)Here are the most useful flags you'll use:
-a
→ archive mode (preserves ownership, permissions, symbolic links, etc.)-v
→ verbose (shows what’s happening)-z
→ compress file data during the transfer--progress
→ show live progress updates--delete
→ delete files on the destination that don’t exist on the source-e ssh
→ use SSH for remote connectionsrsync -av /source/path/ /destination/path/
This copies everything in /source/path/
into /destination/path/
, preserving metadata.
rsync -avz /local/dir/ user@remote_ip:/remote/dir/
The -z
adds compression; the -e ssh
part is implicit when using a remote host.
rsync -avz --dry-run /local/dir/ user@remote:/dir/
Great for testing before syncing anything — nothing is actually copied.
rsync -avz user@remote_ip:/etc/ /backup/etc/
Use this to create a local snapshot of remote config files.
rsync -av --delete /source/ /destination/
This ensures that the destination matches the source — including deletions.
rsync -av --exclude="*.log" /src/ /dest/
Skip all .log
files in this example.
Want daily server config backups?
Create a script like:
rsync -az /etc/ user@backup:/home/backups/hostname/etc/
Add to your crontab with crontab -e
:
0 2 * * * /home/youruser/rsync-backup.sh
This runs the job every night at 2:00am.
Title: Master Rsync! The Ultimate Linux File Syncing Guide!
Channel: Tech Simplified
Rsync is one of those tools that becomes indispensable once you understand it. It’s reliable, efficient, and battle-tested — perfect for everything from simple file copies to full system migrations.
Whether you're managing a single VPS or a fleet of servers, learning to use rsync well will save you time, bandwidth, and stress. Why not try it out on our high performance VPS? You can get started for just $6.99.
Staring at screens all day? Learn how to reduce digital eye strain with proven techniques and tools. This guide is essential for remote workers, developers, and anyone in tech.
4 min read - May 21, 2025
5 min read - May 20, 2025
Flexible options
Global reach
Instant deployment
Flexible options
Global reach
Instant deployment