# man rsync rsync(1) NAME rsync - a fast, versatile, remote (and local) file-copying tool OPTIONS SUMMARY -e, --rsh=COMMAND specify the remote shell to use --delete delete extraneous files from dest dirs -n, --dry-run perform a trial run with no changes made -r, --recursive recurse into directories --stats The '-a' is equals '-rlptgoD'. But General user cannot use 'goD' option. So General user must use -rlpt.
rsync -avzh --stats /tmp/test1/ /tmp/test2.bk rsync -avzh --stats /tmp/test1/ /tmp/test2.bk/ rsync -avzh --stats --delete /home/user1/ /tmp/user1.bk/
rsync -e ssh -avzh --stats --delete /home/user1/ user2@192.168.0.2:/home/backup/server1/home/user1/ rsync -e "ssh -i /home/user1/.ssh/nopass" -avzh --stats --delete /home/user1/ user1@192.168.0.2:/home/user1/backup/server1/home/user1/
rsync -e ssh -avzh --stats –-bwlimit=1250 FILE user@192.168.0.2:/DIR/ --bwlimit=12500 # 100Mbps = 12500KBps = 12.5MB/s --bwlimit=1250 # 10Mbps = 1250KBps = 1.25MB/s --bwlimit=125 # 1Mbps = 125KBps --bwlimit=62 # 500kbps = 62.5KBps
rsync -avzh --stats --include='*.log' --exclude='*' srcdir/ dstdir/ rsync -avzh --stats --exclude='*.gz' srcdir/ dstdir/ rsync -avzh --stats --exclude='.*' srcdir/ dstdir/ rsync -avzh --stats --progress --partial src:/path/to/log/2020-09\*.log ./log
$ rsyc -avzh --stats -e ssh --progress --partial --append SOURCE-FILE xx.xx.xx:/DESTINATION/ $ nohup rsyc -avzh --stats -e ssh --progress --partial --append SOURCE-FILE xx.xx.xx:/DESTINATION/ &
/etc/sudoers user01 ALL= NOPASSWD:/usr/bin/rsync rsync -a -e "ssh" --rsync-path="sudo rsync" user01@192.168.0.11:/root/test/ /test/tmp