| Goal | Reach for |
|---|---|
| Sync files to another disk | $ rsync |
| Versioned, deduplicated backups | |
| Clone a whole disk or partition | |
| Rescue a failing drive | $ ddrescue |
| Push to cloud storage | $ rclone |
| Snapshot a live filesystem |
| Flag | Description |
|---|---|
| -a | Archive mode (preserve metadata, recurse) |
| -v | Verbose output |
| -z | Compress data during transfer |
| -h | Human-readable sizes |
| --delete | Remove extra files from destination |
| -n / --dry-run | Show what would happen, change nothing |
| --exclude | Skip matching paths |
| --progress | Show per-file progress |
| Tool | Strengths |
|---|---|
| borg | Dedup, compression, encryption, mountable archives |
| restic | Simple, fast, many cloud backends built in |
| duplicity | Encrypted incremental backups via GPG |
| bup | Git-based dedup, handles huge files well |
| rsnapshot | rsync plus hard-link rotation, no extra format |
| Option | Description |
|---|---|
| if= | Input file or device |
| of= | Output file or device |
| bs= | Block size (4M is a good default) |
| status=progress | Show transfer progress |
| conv=noerror,sync | Keep going past read errors, pad blocks |
| conv=fsync | Flush to the device before exiting |
| count= | Copy only N blocks |
| System | Create a snapshot |
|---|---|
| LVM | lvcreate -s -n snap -L 5G /dev/vg/lv |
| Btrfs | btrfs subvolume snapshot / /snap |
| ZFS | zfs snapshot pool/data@backup |