小知识:cwrsync 四步实现windows备份

服务器端

http://rsync.samba.org/ 服务器端(cwRsyncServer)。

安装目录: E:\cwRsyncServer

端口: 52326

ip: 219.152.120.82

一:修改cwRsyncServer配置文件 E:\cwRsyncServer\rsyncd.conf

#########

port = 52326

use chroot = false

strict modes = false

read only = yes

list = no

hosts allow = *

max connections = 10

secrets file = rsyncd.secrets #指定用户登录的密码文件

motd file = rsyncd.motd #连接上rsync server时显示的欢迎信息

log file = rsyncd.log

pid file = rsyncd.pid

transfer logging = yes

# Module definitions

# Remember cygwin naming conventions : c:\work becomes /cygwin/c/work

#

[test]

path = /cygdrive/c/work

read only = false

transfer logging = yes

[t_task]

path = /cygdrive/c/work

read only = false

transfer logging = yes

#################################

二:在E:\cwRsyncServer目录下新建密码文件 rsyncd.secrets 内容为用户名:密码

如: tly:fjs249slke

客户端:

http://rsync.samba.org/ 下载cwRsync客户端(cwRsync)

安装目录: E:\cwRsync

三:在E:\cwRsyncServer目录下新建密码文件 rsyncd.secrets 内容为密码

如:fjs249slke

四:开始–>运行–>cmd 输入以下命令即可同步服务器端t_task模块到客户端e:/y目录下。

E:\cwRsync\bin\rsync.exe -vazu –exclude article/ –progress –delete –

password-file=E:\cwRsync\rsyncd.secrets

rsync://odinxu@219.152.120.82:52326/t_task /cygdrive/e/y

照做可同步服务了,如果不行,1.检查服务器是否有开服务端口,命令行输入( netstat -a ) 可查看服务器开的端口。就是上面的52326端口。2.客户端命令行输入( telnet 服务端ip 服务端口 ) 能否连接服务器端。3.检查配置文件是否跟上面一样。

注:以上为匿名连接入服务器端,一般会在模块里添加 auth user= odinxu 指定用户,一定要注意,指定的用户必须要登陆才能进行同步服务。 我在这里掐了很久,模块里指定了用户,用户又没有登陆,导致出错。

新手常出现的错误:

错误1: rsync: read error: Connection reset by peer (104)

rsync error: error in rsync protocol data stream (code 12) at io.c(794) [receive

r=3.0.2]

解决:很大可能是服务器端没有开启 rsync 服务。开启服务。

错误2:@ERROR: chdir failed

rsync error: error starting client-server protocol (code 5) at main.c(1495) [rec

eiver=3.0.2]

解决:服务器端同步目录没有权限,cwrsync默认用户是Svcwrsync。为同步目录添加用户Svcwrsync权限。

错误3:@ERROR: failed to open lock file

rsync error: error starting client-server protocol (code 5) at main.c(1495) [rec

eiver=3.0.2]

解决:配置文件 rsync.conf中添加 lock file = rsyncd.lock 即可解决。

声明: 猿站网有关资源均来自网络搜集与网友提供,任何涉及商业盈利目的的均不得使用,否则产生的一切后果将由您自己承担! 本平台资源仅供个人学习交流、测试使用 所有内容请在下载后24小时内删除,制止非法恶意传播,不对任何下载或转载者造成的危害负任何法律责任!也请大家支持、购置正版! 。本站一律禁止以任何方式发布或转载任何违法的相关信息访客发现请向站长举报,会员发帖仅代表会员个人观点,并不代表本站赞同其观点和对其真实性负责。本网站的资源部分来源于网络,如有侵权烦请发送邮件至:2697268773@qq.com进行处理。
建站知识

小知识:使用rsync同步网路备份

2023-4-24 19:16:38

建站知识

小知识:用Rsync(cwRsync)将Dreamhost的数据备份到Windows上

2023-4-24 19:31:16

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索