关键参数解释:
rsync --help|grep bwlimit
--bwlimit=KBPS limit I/O bandwidth; KBytes per second
--progress show progress during transfer
--include=PATTERN don't exclude files matching PATTERN
--port=PORT specify double-colon alternate port number
sent 21 bytes received 20 bytes 5.47 bytes/sec
total size is 0 speedup is 0.00
最后,
实际用时可能还会加入Crontab:
每半个小时同步一下
crontab -u root -e
0,30 * * * * 写成一个shell去执行。
可能会出现问题:
view plainprint?
root@darkstar:~# rsync --bwlimit=3000 --progress --port=873 /root/elink/* elink@10.6.208.188:elink
Host key not found from database.
Key fingerprint:
xuror-ledab-buhim-zohok-tanop-cyrig-tysac-gyhyp-refan-semim-pyxex
You can get a public key's fingerprint by running
% ssh-keygen -F publickey.pub
on the keyfile.
warning: tcsetattr failed in ssh_rl_set_tty_modes_for_fd: fd 5: Interrupted system call
root@darkstar:~# strace -o t rsync --bwlimit=3000 --progress --port=873 /root/elink/* elink@10.6.208.188:elink
Host key not found from database.
Key fingerprint:
xuror-ledab-buhim-zohok-tanop-cyrig-tysac-gyhyp-refan-semim-pyxex
You can get a public key's fingerprint by running
% ssh-keygen -F publickey.pub
on the keyfile.
Are you sure you want to continue connecting (yes/no)? yes
Host key saved to /root/.ssh2/hostkeys/key_36000_10.6.208.188.pub
host key for 10.6.208.188, accepted by root Tue Sep 06 2011 20:25:10 +0800
elink's password:
iptables-1.3.1.tar.bz2
180670 100% 10.08MB/s 0:00:00 (1, 100.0% of 1)
sent 180787 bytes received 46 bytes 32878.73 bytes/sec
total size is 180670 speedup is 1.00