# rsync

> rsync is a command line tool that copies and synchronizes files locally or over SSH, sending only the differences between source and destination.

- Source: https://www.itwonderlab.com/rsync/
- Published: 2026-08-29
- Updated: 2026-08-29
- Author: Javier Ruiz Jiménez (https://www.javierruizjimenez.com/)
- Site: IT Wonder Lab (https://www.itwonderlab.com/)

---

**rsync** copies files from one place to another and transfers only what changed, using file size, modification time or checksums. It works between local folders and over [SSH](https://www.itwonderlab.com/ssh/) to remote servers, which makes it the standard tool for backups, deployments of static files and migrations.

### Key concepts

- **Archive mode (`-a`)**: copies recursively and keeps permissions, owners, times and symbolic links.
- **Trailing slash**: `src/` copies the contents of the folder, `src` copies the folder itself.
- **`--delete`**: removes from the destination what no longer exists in the source, so it makes an exact mirror.
- **`--dry-run`**: shows what would happen without changing anything.
- **Snapshots**: `--link-dest` makes incremental backups where unchanged files are hard links.

### Learn it

Follow the [rsync tutorial: backups over SSH](https://www.itwonderlab.com/rsync-tutorial-backup-ssh/) and schedule it with [cron](https://www.itwonderlab.com/cron/). For [S3](https://www.itwonderlab.com/aws-s3/) the equivalent is `aws s3 sync`.
