测试centos5.2自带的rsync无法读取.conf配置文件,后来放弃自带的rsync,在以下地址下载源码编译安装
下载地址:http://mattmccutchen.net/rsync/packages.html ,目前最新版是3.04
解压编译
./configure --prefix=/usr/local/rsync
make
make install
新建一个rsyncd.conf配置文件
[root@localhost bin]# vi rsyncd.conf
nimal configuration file for rsync daemon
# See rsync(1) and rsyncd.conf(5) man pages for help
# This line is required by the /etc/init.d/rsyncd script
pid file = /var/run/rsyncd.pid
port = 873
address = 192.168.139.77
#uid = nobody
#gid = nobody
uid = root
gid = root
use chroot = no
read only = yes
#limit access to private LANs
hosts allow=192.168.139.66
hosts deny=*
max connections = 5
motd file = /etc/rsyncd/rsyncd.motd
#This will give you a separate log file
#log file = /var/log/rsync.log
#This will log every file transferred - up to 85,000+ per user, per sync
#transfer logging = yes
log format = %t %a %m %f %b
syslog facility = local3
timeout = 300
[usr]
path = /usr
list=no
ignore errors
comment = usr
auth users = root
secrets file = /etc/rsyncd/rsyncd.secrets #注意这个文件只能设为600权限
再像这样启动rsync
[root@localhost bin]# rsync --daemon --config=/usr/local/rsyncd/bin/rsyncd.conf
windows备份机上安装cwRsync
下载地址:http://www.softpedia.com/progDownload/cwRsync-Download-45383.html
安装好之后这样连接到linux获取文件,如果没有问题应该看到Password:字样的提示,
D:\Program Files\cwRsync\bin>rsync -vzrtopg --progress --delete root@192.168.139.77::usr .\temp\
其中 temp 我是建在bin下,现在还不知道用什么方法把备份目录建到别的盘