CentOS rsync Server for data synchronization with Windows Cwrsync clients

Source: Internet
Author: User
Tags custom name rsync

CentOS rsync Server for data synchronization with Windows Cwrsync client May 06, 2012? Rsync? No comments at this stage? Be Onlookers3, 622 times +Description:1, rsync service-side system: CentOS5.5IP Address:192.168.21.160Data storage directory:/data/Osyunwei2, Cwrsync client system: Windows Server2003IP Address:192.168.21.130Synchronized Directories: D:\osyunwei Implementation Purpose: Cwrsync client automatically synchronizes the rsync server every 3:00 clock/data/Osyunwei data in directory to D:\osyunwei directory one, rsync server configuration1, close SELINUXVI/etc/selinux/config #编辑防火墙配置文件 #selinux=Enforcing #注释掉 #selinuxtype=targeted #注释掉SELINUX=disabled #增加: Wq #保存, close shutdown-R now #重启系统系统运维 www.osyunwei.com warm reminder: qihang01 original content? Copyright, reproduced Please specify the source and the original link2, open Firewall TCP 873 port (rsync default port) VI/etc/sysconfig/iptables #编辑防火墙配置文件-A rh-firewall-1-input-m State--state new-m tcp-p TCP--dport873-J Accept:wq!#保存/etc/init.d/iptables Restart #最后重启防火墙使配置生效3, installing the rsync Server Software yum install rsync xinetd #安装vi/etc/xinetd.d/rsync #编辑配置文件, set boot rsyncdisable=No #修改为/etc/init.d/xinetd start #启动 (xinetd to manage rsync services in CentOS)4, creating the Rsyncd.conf Profile VI/etc/rsyncd.conf #创建配置文件, add the following code, log file= /var/log/Rsyncd.log #日志文件位置, automatically generate this file after you start rsync without having to create it in advance. [Osyunwei] #自定义名称path=/data/Osyunwei #Rsync服务端数据目录路径comment=Osyunwei #模块名称与 [Osyunwei] Custom name same UID=Root #设置rsync运行权限为rootgid=Root #设置rsync运行权限为rootport=873#默认端口read only=no #设置为no, Cwrsync client can upload file, yes Read only write=no #设置为no, cwrsync client can download files, yes cannot download auth users=Osyunweibakuser #执行数据同步的用户名, you can set multiple, separated by commas in the English state secrets file=/etc/Rsync.pass #用户认证配置文件, inside Save the user name and password, will be created later this file hosts allow=192.168.21.130#允许进行数据同步的客户端IP地址, you can set multiple, separated by a comma in the English state of the hosts deny=192.168.21.254#禁止数据同步的客户端IP地址, you can set multiple, comma-separated list in English state=Yes #显示Rsync服务端资源列表系统运维 www.osyunwei.com warm reminder: qihang01 original content? Copyright, reprint Please specify source and original link: Wq!#保存5, create user authentication file VI/etc/Rsync.pass #配置文件, add the following osyunweibakuser:123456#格式, Username: password, can be set multiple, one user name per line: password: Wq!#保存6, set file permissions chmod -/etc/rsyncd.conf #设置文件所有者读取, write permission chmod -/etc/rsync.pass #设置文件所有者读取, write permissions7, start rsync/etc/init.d/xinetd start #启动service xinetd stop #停止service xinetd restart #重新启动二, cwrsync client Settings1, download Cwrsync client software: http://Jaist.dl.sourceforge.net/project/sereds/cwrsync/4.0.3/cwrsync_4.0.3_installer.zip2, install Cwrsync client decompression cwrsync_4.0.3_installer.zip double hit Open cwrsync_4.0. 3_installer.exe Next Next Iagree agree to install next default installation path C:\Program Files\cwrsync Install installation Close installation Complete3, testing whether the communication with the Rsync server started successfullyRuncmd input CD C:\Program files\cwrsync\bin enter and then Telnet192.168.21.160 873Enter the Telnet interface indicating successful communication with Rsync server C:\Program Files\cwrsync\bin refers to the Cwrsync program installation path4, the Cwrsync client synchronizes the data from the Rsync server to startRuncmd, input CD C:\Program files\cwrsync\bin return and enter Rsync--port=873-VZRTOPG--progress--delete [email protected]192.168.21.160:: osyunwei/cygdrive/d/Osyunwei Enter Password:123456Enter to start synchronizing data, wait for execution to complete, can open D:\osyunwei with Rsync server/data/Compare the data in the Osyunwei directory to see if the same description: D/Osyunwei represents D:\osyunweiosyunwei representativeThe custom module name in the/etc/rsyncd.conf file comment =Osyunwei192.168.21.160#Rsync服务端IP地址osyunweibakuser #执行数据同步的用户--port=873#端口-VZRTOPG--Progress #显示同步过程详细信息--delete #从cwRsync客户端D: Removed from \osyunwei directory with Rsync server/data/Osyunwei different data in the directory, that is, to ensure that the data on both sides is exactly the same. Add a batch script file to the Cwrsync client's task plan, and automatically synchronize the rsync server every 3:00 clock/data/Osyunwei The data in the directory to the D:\osyunwei directory1, open C:\Program files\cwrsync\bin directory new Passwd.txt input 123456 save continue in C:\Program files\cwrsync\bin directory new Osyunwei.bat input @ echo Offecho.echo start syncing data, wait a minute ... echo.cd C:\Program files\cwrsync\binrsync-VZRTOPG--port=873--progress--delete [email protected]192.168.21.160:: Osyunwei/cygdrive/d/osyunwei <Passwd.txtecho.echo Data Sync complete echo. Last Save Exit2, adding a batch script to the Windows Task Scheduler system operations www.osyunwei.com warm reminder: qihang01 original content? Copyright, reproduced Please specify the source and the original link to start-Settings-Control Panel-Task Schedule Open Add Task schedule, next browse, select Open C:\Program files\cwrsync\bin directory Osyunwei.bat Perform this task, select Daily, next start time:3:xxRun this task: Each day, next enter the Windows system Administrator's login password, the next step to complete the extension instructions: If you want to adjust the synchronization time, open the task plan inside the Osyunwei switch to the schedule to the option settings, You can also turn on advanced to set up every few minutes to run Osyunwei.bat this script so that the CentOS rsync server and the Windows Cwrsync client to achieve data synchronization complete? This article links: http://www.osyunwei.com/archives/3769.html? Subscribe to this site: http://Www.osyunwei.com/feed? Reprint please indicate source: system operation? CentOS rsync Server for data synchronization with Windows Cwrsync clients

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.