> ## Content Index
> Fetch the complete content index at: https://new-blog.dougals.me/llms.txt
> Use this file to discover other available public pages before exploring further.

# rsync for the win
- URL: https://new-blog.dougals.me/rsync-for-the-win/
- Published: 2026-04-05T14:00:38.000Z
- Updated: 2026-04-05T14:00:38.000Z
- Author: Dougie Richardson
- Tags: Linux, Fedora, #Migrated-1789219936886, #wp, #wp-post, #Import 2026-09-12 13:32

I prefer `rsync` over `cp` or `scp`:

| 1\. Delta-transfer           | **Delta-transfer algorithm** only sends the bytes that have changed.                                                                      |
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| 2\. Resilient and repeatable | The \--partial flag picks up where transfer fails.                                                                                        |
| 3\. Metadata preservation    | Preserves **permissions and ownership**, **symbolic links**, and **timestamps** (critical for audit trails and incremental backup logic). |
| 4\. Dry run                  | Simulate a transaction with \--dry-run.                                                                                                   |

### Examples

#### 1\. Remote Push: Sending local data to a server

Force SSH for the transport layer with `-e ssh`.

```bash
rsync -avz -e ssh /local/path/ user@remote_host:/remote/path/

```

#### 2\. Remote pull from a server

Use this to pull logs or database dumps for local analysis.

```bash
rsync -avz -e ssh user@remote_host:/remote/path/ /local/path/

```

#### 3\. Backup to external drive

On Fedora, external drives are automatically mounted under `/run/media/`. This command creates a mirror and `--delete` removes files no longer on the source.

```bash
rsync -av --progress --delete /home/user/Documents/ /run/media/user/ExternalDrive/Backup/

```

### Final Verdict

Stop copying and start synchronizing but remember the `--dry-run` flag!