rsync -av --exclude=/root/suncw/swoole /root/suncw /data/backup/1/ Local backup backup /root/suncw directory to /data/backup/1/
rsync -av [email protected]:/data/backup/1/ /root/suncw Backup the directories and files in the remote server directory /data/backup/1 to the local /root/suncw
rsync -av /root/suncw [email protected]:/data/backup/1/ Backup the files in the local directory /root/suncw to the remote server 192.168.1.226 server
Under the non-default ssh port, take 56789 as an example
rsync -av -e 'ssh -p 56789' /root/suncw [email protected]:/data/backup/1/