rsync –delete 可以删除两边不同步的文件
- 传输数据命令
script -q -c '/usr/local/lsum/scripts/.dropbear/rsync-x86_64 -aH --human-readable --info=progress2 --bwlimit=100 --rsh="/usr/local/lsum/scripts/.dropbear/ssh -o StrictHostKeyChecking=no -i /usr/local/lsum/var/.ssh/id_rsa" lsum@172.19.143.20:lsum . ' > /tmp/rsync.progress
- 查看进度
cat /tmp/rsync.progress|grep -E '[0-9]%|[a-z]'|grep -v 'receiving incremental file list'
- 结果示例
zabbix-5.0.0.tar.gz
6,324,224 34% 10.00kB/s 0:20:19