WINDOWS下cwRsync搭建步骤:
1、http://rsync.samba.org/ 下载cwRsync客户端(cwRsync)和服务器端(cwRsyncServer)。
2、在客户端安装cwRsync。
3、在服务端安装cwRsyncServer。
4、配置服务端rsyncd.conf。
例如:
[test]
path=e:/test
comment=Data Backup for Summer's laptop
read only=no
use chroot=no
strict modes = no
transfer logging=yes
use lfs=yes
hosts allow=172.25.43.57
hosts deny=*
/*上面是设置了一个test模块,相关配置在下面解释*/
5、重起服务端cwRsyncServer。
6、搭建已经完毕,可以开始命令操作。
rsync -avrp /test/ administrator@172.25.43.58::test --password-file=1234567
(表示将客户端test目录下文件备份到服务器test模块下。如果将/test/放后面,表示将服务器test模块下目录备份带客户端/test/下。)
选项说明:
-v, --verbose 详细模式输出
-q, --quiet 精简输出模式
-c, --checksum 打开校验开关,强制对文件传输进行校验
-a, --archive 归档模式,表示以递归方式传输文件,并保持所有文件属性,等于-rlptgoD
-r, --recursive 对子目录以递归模式处理
-R, --relative 使用相对路径信息
其他参数可以查看rsync相关手册。
相关解释:
uid = nobody
gid = nobody
use chroot = no # 不使用chroot
max connections = 4 # 最大连接数为4
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log # 日志记录文件
[inburst] # 这里是认证的模块名,在client端需要指定
path = /home/inburst/python/ # 需要做镜像的目录
comment = BACKUP CLIENT IS SOLARIS 8 E250
ignore errors # 可以忽略一些无关的IO错误
read only = yes # 只读
list = no # 不允许列文件
hosts allow=172.25.43.57 #允许连接IP
auth users = inburst # 认证的用户名,如果没有这行,则表明是匿名
secrets file = /etc/inburst.pas # 认证文件名
注:
为安全考虑,在设置服务端rsyncd.conf模块时,最好加上auth users = inburst,secrets file = /etc/inburst.pas,密码写到一个文件中inburst.pas。
执行命令时:rsync -avrp /test/ inburst@172.25.43.158::test --password-file=inburst.pas。
1、http://rsync.samba.org/ 下载cwRsync客户端(cwRsync)和服务器端(cwRsyncServer)。
2、在客户端安装cwRsync。
3、在服务端安装cwRsyncServer。
4、配置服务端rsyncd.conf。
例如:
[test]
path=e:/test
comment=Data Backup for Summer's laptop
read only=no
use chroot=no
strict modes = no
transfer logging=yes
use lfs=yes
hosts allow=172.25.43.57
hosts deny=*
/*上面是设置了一个test模块,相关配置在下面解释*/
5、重起服务端cwRsyncServer。
6、搭建已经完毕,可以开始命令操作。
rsync -avrp /test/ administrator@172.25.43.58::test --password-file=1234567
(表示将客户端test目录下文件备份到服务器test模块下。如果将/test/放后面,表示将服务器test模块下目录备份带客户端/test/下。)
选项说明:
-v, --verbose 详细模式输出
-q, --quiet 精简输出模式
-c, --checksum 打开校验开关,强制对文件传输进行校验
-a, --archive 归档模式,表示以递归方式传输文件,并保持所有文件属性,等于-rlptgoD
-r, --recursive 对子目录以递归模式处理
-R, --relative 使用相对路径信息
其他参数可以查看rsync相关手册。
相关解释:
uid = nobody
gid = nobody
use chroot = no # 不使用chroot
max connections = 4 # 最大连接数为4
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log # 日志记录文件
[inburst] # 这里是认证的模块名,在client端需要指定
path = /home/inburst/python/ # 需要做镜像的目录
comment = BACKUP CLIENT IS SOLARIS 8 E250
ignore errors # 可以忽略一些无关的IO错误
read only = yes # 只读
list = no # 不允许列文件
hosts allow=172.25.43.57 #允许连接IP
auth users = inburst # 认证的用户名,如果没有这行,则表明是匿名
secrets file = /etc/inburst.pas # 认证文件名
注:
为安全考虑,在设置服务端rsyncd.conf模块时,最好加上auth users = inburst,secrets file = /etc/inburst.pas,密码写到一个文件中inburst.pas。
执行命令时:rsync -avrp /test/ inburst@172.25.43.158::test --password-file=inburst.pas。