首先在两台服务器上做好ssh-keygen免密码登录
编写rsync脚本rsync.sh
/usr/bin/rsync -tvazrp /home/hello/temp/$1 root@192.168.1.1:/home/ftp/"
执行脚本方式:
rsync.sh test.txt
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。