Go: Use rsync to synchronize between Linux (server side) and Windows (client)

Source: Internet
Author: User
Tags rsync

Transferred from: http://blog.csdn.net/old_imp/article/details/8826396
Before installing rsync and xinetd on Linux (I'm using a CentOS system), check to see if it's installed on Linux:
#rpm-qa|grep rsync#rpm-qa|grep xinetd Install if none, or use tar to compile #rpm-ivh rsync-2.6.8-3.1.rpm or yum install rsync (this is the way I use) yum Install xinetd (This is the method I use)
Two Open Rsync services
#chkconfig xinetd on
#chkconfig rsync on

Three create a rsyncd.conf configuration file (set to 600 permissions) in the/etc/directory port = 873
UID = root
GID = root
Use Chroot=no
Read Only = yes
Hosts allow=*
Max connextions = 4

[WWW]
Path =/********/****l/****
Comment = BACKUP WWW
Ignore errors
Read Noly = yes
List = no
Auth users = root
Hosts allow = *
Secrets file =/etc/rsync.pass (filenames are just examples, including suffixes can be customized) the meaning of the parameters in the configuration files can be referred to http://hi.baidu.com/setcookie/item/ 14f9e8998ad1028858146135 Four Create Rsync.pass file (set to 600 permissions)
, which is the path specified in the secrets file in the rsync.conf files, enter the account password account that exists in the Linux system: password   Five modify Etc/xinetd/rsync file to change disable = yes to  disable = No six start the Rsync service based on the XINETD process #/etc/init.d/xinetd start  Seven Windows machine installed cwrsync  eight open 873 ports on Linux (the port that Rsync uses by default)   Nine open cmd to synchronize H:\cwRsync\bin\rsync.exe-vzrtopgu--progress--delete [email protected]::www/cygdrive/ D/test then you can see the prompt to enter the password, enter the password to start syncing. Explanation: H:\cwRsync\bin\rsync.exe is the path of Rsync.exe www is the module name specified in the rsync.conf file [email protected] is the Linux machine user name, ip/ The meaning of cygdrive/d/test is to back up to the Windows local D:\test path, other paths according to gourd painting scoop, such as E:\test, written/cygdrive/e/test  10 Windows client settings Cwrsync automatically synchronize the creation of a. bat file, edit the following command content to save: h:\cwRsync\bin\rsync.exe-vzrtopgu--progress--delete [email  protected]::www/cygdrive/g/backup--password-file=/cygdrive/d/ Rsync.pass Next, create the Task Scheduler for Windows as needed, and add the action to start the. bat file in the action list. Explanation: password-file=/cygdrive/d/rsync.pass Specifies the location of the password file on the Windows client machine. The password file format on the Windows client is different from the format on the Linux server, just write the password. If you execute the above command in CMD, you can not enter a password because the program will automatically read the input password file.   11 security Sometimes you need to change the port 1 used by rsync to open the port you need to use on the server 2 repairChange the rsyncd.conf profile on the server to port = (port number to use) 3 the password for the local client link server backup has to be modified, including the--port= (port number) For example: H:\CWRSYNC\BIN\RSYNC.EXE-VZRTOPGU  --port= (port number)--progress--delete [Email protected]::www/cygdrive/g/backup--password-file=/cygdrive/D/ rsync.pass  12 If you restart the server, the client backup error message connection refused (111)   Resolution complete error TIP: rsync:failed to connect to 10.10.10.170:connection refused (111)  
Rsync error:error in Socket IO (code ten) at CLIENTSERVER.C (124) [receiver=3.0.5]
Workaround: Server-side start-up service: rsync--daemon--config=/etc/rsyncd.conf

Go: Use rsync to synchronize between Linux (server side) and Windows (client)

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.