| Copy a folder (with progress) |
rsync -avh --progress source/ destination/ |
| Try first: what would happen? |
rsync -avhn source/ destination/ |
| To another computer via SSH |
rsync -avh source/ user@host:/path/destination/ |
| Retrieve from another computer |
rsync -avh user@host:/path/source/ destination/ |
| With a different SSH port |
rsync -avh -e "ssh -p 2222" source/ user@host:/path/destination/ |
| Compress modified files during transfer |
rsync -avhz source/ user@host:/path/destination/ |
| Delete what no longer exists in the source (be careful!) |
rsync -avh --delete source/ destination/ |
| Skip files or folders |
rsync -avh --exclude='*.tmp' --exclude='node_modules/' source/ destination/ |
| Resume interrupted transfer |
rsync -avhP source/ destination/ |
| Limit the speed (kB/s) |
rsync -avh --bwlimit=5000 source/ user@host:/path/ |
| Overall progress overview |
rsync -avh --info=progress2 source/ destination/ |
| Compare by content instead of time and size |
rsync -avhc source/ destination/ |
| On the other side with sudo |
rsync -avh --rsync-path="sudo rsync" source/ user@host:/path/ |