-a, --archive
|
It is a quick way of saying you want recursion and want to preserve almost everything.
|
-r, --recursive
|
This tells rsync to copy directories recursively.
|
-t, --times
|
This tells rsync to transfer modification times along with the files and update them on the remote system
|
-u, --update
|
This forces rsync to skip any files for which the destination file already exists and has a date later than the source file
|
-z, --compress
|
With this option, rsync compresses any data from the files that it sends to the destination machine
|
-P
|
断点续传 详细显示传输过程(传输进度)
|
-c, --checksum
|
This forces the sender to checksum all files using a 128-bit MD4 checksum before transfer
|
-n, --dry-run
|
This tells rsync to not do any file transfers, instead it will just report the actions it would have taken.
|
--delete
|
This tells rsync to delete any files on the receiving side that aren't on the sending side
|
--bwlimit=KBPS
|
This option allows you to specify a maximum transfer rate in kilobytes per second
|
--protocol
(隐藏参数)
|
选择传输时使用的TCP/IP协议字段号
|
-B
|
--block-size=SIZE checksum blocking size (default 700)
|
cat>/etc/rsyncd.conf<<EOF
uid=root
gid=root
secrets file = /etc/rsyncd.secrets
max connections=36000
use chroot=no
log file=/var/log/rsyncd.log
pid file=/var/run/rsyncd.pid
lock file=/var/run/rsyncd.lock
[rsyncDST]
path=/home/work/rsyncDST/share/1/0/
comment = rsync test
ignore errors = no
read only = no
hosts allow =10.0.101.241
hosts deny = *
EOF
|
cat>/etc/rsyncd.secrets<<EOF
rsync:123456
EOF
|
chmod 600 /etc/rsyncd.secrets
|
/usr/local/rsync/bin/rsync --daemon
|