Winrsync synchronizing Windows data to Linux

Source: Internet
Author: User
Tags rsync

Goal

Fully synchronize data from a directory on a Windows server to a Linux server. As a server, Windows opens port 873, Linux as a client, and pulls data from the far end to Windows servers.


Windows Deployment Cwrsyncserver

1, download cwRsyncServer4.1, install, you can customize the user name password at the time of installation, but you must ensure the complexity of the password, or the system will not be able to successfully create users and services.

650) this.width=650; "src=" https://s4.51cto.com/wyfs02/M00/05/E3/wKiom1muEyDgVrleAADegCMgPpU905.jpg "title=" 444. JPG "alt=" wkiom1mueydgvrleaadegcmgppu905.jpg "/>


2, after installation, enter the corresponding directory configuration conf file, the default installation path in C:\Program files (x86) \ICW, modify the rsyncd.conf file under this directory:

Use chroot = falsestrict modes = falsehosts Allow = *log File = Rsyncd.logport = 873uid = 0 gid = 0# Module definit  ions# Remember Cygwin naming conventions:c:\work Becomes/cygwin/c/work#[rsyncdata] # synchronization module, can set multiple path =/cygdrive/d/rsyncdata #此处表示D:/rsyncdata directory Read Only = Falsetransfer logging = yeshosts allow = 192.168.1.231 #此处为 Linux server address Auth users = rsyncsecrets file =/cygdrive/d/rsyncd.secrets #密码文件路劲

3. Create sync folder and password file:

    • Create the Rsyncd.secrets file in the D drive, confirm that the suffix is secrets instead of TXT and add the account password content:

      Rsync:rsync

    • Create or select the folder where you want to synchronize data and add Svccwrsync user rights (full contronal) to the folder.

4. Start the service:

Enter services.msc in the Run Command box, enter the service management interface, set the Rsyncserver service self-boot

650) this.width=650; "src=" https://s4.51cto.com/wyfs02/M02/A4/97/wKioL1muPrOSrTIwAAHX_PG9GNc676.jpg "title=" 444. JPG "alt=" wkiol1muprosrtiwaahx_pg9gnc676.jpg "/>

5. Configure Windows Firewall to add allow access to port 873 in the stack rule.


Linux Server sync files

1. Install rsync on a Linux server:

Yum Install Rsync-y

2. Configure password file:

echo "Rsync" >/etc/rsyncd.secretschmod 600/etc/rsyncd.secrets

3. Create/rsyncdata/data directory to synchronize files using the following command:

RSYNC-VAZRTOPQG--delete--password-file=/etc/rsyncd.secrets [email protected]::rsyncdata/rsyncdata/data/

4, the above command can be added to the scheduled task script, 2 o'clock in the morning every day to execute:

0 2 * * */bin/bash/scripts/rsyncbak/bak.sh &>/dev/null


This article is from the "Trying" blog, make sure to keep this source http://tryingstuff.blog.51cto.com/4603492/1962831

Winrsync synchronizing Windows data to Linux

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.