Checksum-based sync
Compare by checksum not mtime+size; delete-after avoids removing files until transfer succeeds
rsync -ac --delete-after /src/ /dst/
- tool
- rsync7 commands
More rsync commands
-
rsync -aHAXv --numeric-ids /src/ user@<host>:/dst/Preserve hardlinks, ACLs, xattrs, raw uid/gid for host migration; note: trailing slash matters
-
rsync -ai --dry-run --delete /src/ /dst/Preview every change with itemize codes (>f, cd, *deleting) before touching files
-
rsync -a --bwlimit=10M --info=progress2 /src/ user@<host>:/dst/Cap bandwidth to 10 MB/s to avoid saturating the link; progress2 shows overall ETA
-
rsync -a --delete --link-dest=../prev /src/ ./$(date +%F)/Time-Machine-style backup: unchanged files hardlink to prev, only deltas use new space
-
rsync -a --partial --append-verify --info=progress2 big.img user@<host>:/dst/Resume interrupted big files and verify appended part by checksum; note: only safe if source unchanged