Sync by checksum
Compare files by checksum, not by mtime and size. --delete-after removes files only after the transfer
rsync -ac --delete-after /src/ /dst/
- tool
- rsync7 commands
More rsync commands
-
rsync -aHAXv --numeric-ids /src/ user@<host>:/dst/Keeps hard links, ACLs, xattrs and numeric uid/gid when you move to a new host. Note: the trailing slash matters
-
rsync -ai --dry-run --delete /src/ /dst/Show every change with itemize codes (>f, cd, *deleting) before any file is touched
-
rsync -a --bwlimit=10M --info=progress2 /src/ user@<host>:/dst/Cap bandwidth at 10 MB/s so the link is not saturated. progress2 shows total progress and ETA
-
rsync -a --delete --link-dest=../prev /src/ ./$(date +%F)/Time Machine style backups: unchanged files are hard links to prev, only changes take new space
-
rsync -a --partial --append-verify --info=progress2 big.img user@<host>:/dst/Continue an interrupted transfer and verify the appended part with a checksum. Note: safe only if the source has not changed