How to sync and transfer files with rsync
Updated 7/20/2026
rsync is the standard tool for copying files efficiently: it transfers only the differences, so the second sync is much faster.
Local copy
rsync -av /source/ /destination/
-a preserves permissions and dates, -v shows progress.
Copy to another server
rsync -avz /source/ root@SERVER_IP:/destination/
-z compresses data in transit, useful on slow connections.
Exact sync (mirror)
rsync -av --delete /source/ /destination/
Careful: --delete removes from the destination any files no longer in the source.
Test first
rsync -av --dry-run /source/ /destination/
Backup to a Backup Box
Combined with a mounted Backup Box, rsync becomes a simple, robust backup system, see mounting a Backup Box and automated backups with cron.
Put this guide into practice on your own VPS
EU cloud servers, billed hourly, ready in minutes, with one-click installs for dozens of apps.
See pricingRelated tutorials
How to encrypt files and backups
Protect sensitive data by encrypting files and backups before storing or transferring them.
Updated 7/20/2026Storage & filesHow to sync files automatically with Syncthing
Syncthing syncs files in real time between servers and devices, encrypted and without an external cloud.
Updated 7/20/2026Storage & filesHow to manage disk space and partitions
See how your disks are organized, mount a new disk and expand space when you need it.
Updated 7/20/2026