Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Winrsync synchronizes Windows data to Linux

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

target

Fully synchronize the data from a directory on the Windows server to the Linux server. Windows as the server, open port 873, Linux as the client, pull data from the remote end to the Windows server.

Windows deployment cwRsyncServer

1. Download cwRsyncServer4.1 and install it. You can customize the user name and password during installation, but you must ensure the complexity of the password, otherwise the system will not be able to successfully create users and services.

2. After installation, go to the corresponding directory configuration conf file. The default installation path is C:\ Program Files (x86)\ ICW, and modify the rsyncd.conf file in this directory:

Use chroot = falsestrict modes = falsehosts allow = * log file = rsyncd.logport = 873uid = 0 gid = synchronization module: C:\ work becomes / cygwin/c/work# [rsyncdata] # synchronization module Multiple path = / cygdrive/d/rsyncdata # can be set here means the D:/rsyncdata directory read only = falsetransfer logging = yeshosts allow = 192.168.1.231 # here is the Linux server address auth users = rsyncsecrets file = / cygdrive/d/rsyncd.secrets # password file Lu Jin

3. Create a synchronization folder and password file:

Create a rsyncd.secrets file on disk D, make sure the suffix is secrets instead of txt, and add the account password:

Rsync:rsync

Create or select a folder that needs 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 to enter the service management interface, and set the RsyncServer service to start itself.

5. Configure Windows firewall and add access to port 873 in the stack rules.

Linux server synchronizes files

1. Install rsync on the Linux server:

Yum install rsync-y

2. Configure password file:

Echo "rsync" > / etc/rsyncd.secretschmod 600 / etc/rsyncd.secrets

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

Rsync-vazrtopqg-- delete-- password-file=/etc/rsyncd.secrets\ rsync@192.168.1.171::rsyncdata / rsyncdata/data/

4. Add the above command to the scheduled task script and execute it at 2: 00 a. M. every day:

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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report