Efficiently copy, sync and snapshot directory trees locally or over the network with rsync. 13.01.2026 | reading time: 2 min Rsync is the go-to tool for copying and synchronizing directory trees while preserving permissions, timestamps and links, and transferring only changed data to save time and bandwidth. A concrete backup case Scenario: copy "/home/alex/projects/" to an external disk mounted at "/mnt/backup/" first as a dry run, then for real; example commands and simulated output follow. ```bash rsync -avh --delete --dry-run /home/alex/projects/ /mnt/backup/projects/ ``` Simulated dry-run output: ```text sending incremental file list projects/ projects/README.md projects/src/main.c sent 1,234 bytes received 45 bytes total size 123,456 ``` Now run for real: ```bash rsync -avh --delete /home/alex/projects/ /mnt/backup/projects/ ``` Fine-grained control Use `-a` for archive behavior, `--delete` to remove dest files no longer in source (test with `--dry-run`), `--exclude`/`--include` to filter paths, `--partial` and `--partial-dir` to resume interrupted transfers, `-z` to compress over network, and `--backup --backup-dir=DIR` or `--link-dest` to implement incremental or hardlink snapshots; avoid `--delete` surprises by testing first. Network and snapshot tricks Rsync over SSH is common: for example `rsync -az -e "ssh -p 2222" /src/ user@host:/dest/`; for snapshot-style backups combine `--link-dest` on a previous backup to hardlink unchanged files and save space, or pair rsync with scripts that rotate backup directories and use `cp -al` semantics for fast snapshots. Other relevant utilities Rsync is powerful but not always the whole solution: consider deduplicating encrypted backups for long-term storage, object-storage sync for clouds, and snapshot rotation tools to orchestrate retention policies; always test restores, not only backups. Final steps Automate backups with cron or systemd timers, monitor exit codes, and practice restores regularly so a backup is useful when needed; explore deeper backup strategies and consider formal study to sharpen skills—CompTIA Linux+ or LPIC-1 prep at bitsandbytes.academy is an intensive next step. Join Bits & Bytes Academy First class LINUX exam preparation. backup utilities filesystem storage