rsync examples

rsync examples

https://linux.die.net/man/1/rsync

# rsync current directory to remote recursively
rsync -azP --delete . root@remoteip:/mnt/

rsync -chavzP --stats source target
rsync -avz /localpath/file root@remoteip:/path/

parameters

-a, --archive               archive mode; equals -rlptgoD (no -H,-A,-X)
-c, --checksum              skip based on checksum, not mod-time & size
-h, --human-readable        output numbers in a human-readable format
    --delete                delete extraneous files from dest dirs
-z, --compress              compress file data during the transfer
-P                          same as --partial --progress
-v, --verbose               increase verbosity
    --stats                 give some file-transfer stats

28. Feb 2022