Incremental Sync with rsync
Concept & Overview
While cp blindly copies entire files every time, rsync (remote sync) uses a delta-transfer algorithm to copy only files and bytes that have changed. It is the gold standard for server migrations, incremental directory backups, and continuous mirroring.
- -a (archive): Preserves timestamps, symlinks, permissions, and operates recursively.
- -v (verbose): Shows which files are being copied.
- -z (compress): Compresses file data during transmission.
- Notice trailing slashes: rsync -avz src/ backup/ copies the contents of src/ inside backup/.
src/ directory into backup/ with archive mode: run rsync -avz src/ backup/ (or rsync -av src/ backup/).Command Syntax Reference
| Command / Syntax | Description |
|---|---|
rsync -avz src/ backup/ | Sync directory contents preserving file permissions and timestamps |
rsync -av src/ backup/ | Archive copy directory without compression |
Verification Objectives
These conditions will be automatically verified when you run commands inside the interactive terminal simulator:
- ○Run rsync with archive mode
- ○Sync files into backup directory
Ready to complete Quest 129?
Test your skills live in the browser terminal with an emulated Linux filesystem, real-time command evaluation, and instant step-by-step hints.