CentOS7 rsync server under Windows and under cwRsync client data synchronization configuration

Recently I wanted to demand regular data backup server to the Linux server disk d above, make a note of the problems encountered by the way wrote

cwrsync under the whole had a win before (client) + rsync (server: storage) of the bat script

rsync (client) and the whole had a Linux + rsync (server: storage) of sh script

The whole under a Linux rsync (server) + windows (client) notes

Client: 192.168.10.19 (cwrsync-Windows)

Server: 192.168.10.20 (rsync-Linux)

 

Introduction to rsync:

Data mirroring is rsync tool linux system. Use fast incremental backup tool Remote Sync can synchronize remote support local replication, or, rsync host synchronized with the other SSH.

 

1, Centos7-rsync server configuration:

[root @ zabbix /] # vi / etc / rsyncd.conf # create a profile, add the following code 
log File = / var / log / rsyncd.log 
[Backup] 
path = / data1 / Backup 
the Comment = Backup 
uid = root 
gid = root 
Port = 873 
the Read only = NO
 the Write only = NO 
auth the Users = ktrsync 
Secrets File = / data1 / rsyncd / rsyncd.pass 
hosts the allow = * 
#hosts deny = 192.168 .10.30    Prohibition data synchronization client IP address, you can set up multiple, separated by commas in the English state 
List = yes  configuration parameters, pay attention not to copy the configuration inside the Chinese go! 
log 

File = / var / log / rsyncd.log # log file location, the file is automatically generated after the start rsync, without creating advance. 
[backup] # custom name 
path = / DATAl / Backup server data directory path #Rsync 
Comment = Backup module name and # [Backup] custom name same 
UID = the root run rsync # Set permissions for the root 
GID = the root Set # rsync run permissions for root 
port = 873     # default port for 
the Read only = NO # is set to no, cwRsync client can upload files, yes read only
 the Write only = NO # is set to no, cwRsync client can download files, yes can not be downloaded
the Users auth  =ktrsync # perform data synchronization user name, you can set up multiple, separated by commas in the English state 
Secrets File = / data1 / rsyncd / rsyncd.pass # user authentication configuration file, which saves the user name and password will be created later this file 
hosts the allow = *   # allows synchronization of customer data, client IP address, you can set up multiple, separated by a comma in the English state, should promise to write * 
hosts deny = 192.168 .10.30   # prohibition of customer data synchronization client IP address, can set up multiple, separated by a comma in the English state 
list = yes # display Rsync server resource list

2, create a user authentication file

vi   / data1 / rsyncd / rsyncd.pass # configuration file, add the following 
ktrsync: 123456   # format username: password, you can set up multiple, one per line Username: Password 
: WQ # save!

3, set file permissions

chmod  600 / etc / rsyncd.conf # Set the file owner read, write permissions
 chmod  600 /data1/rsyncd/rsyncd.pass # Set the file owner read, write permissions

4, start rsync

systemctl start rsyncd # start 
systemctl stoprsyncd # stop 
systemctl restart rsyncd # Restart

 

5, Windows-cwRsync client

Cwrsync client installation instructions: https://www.cnblogs.com/Sungeek/p/9042049.html

Guess you like

Origin www.cnblogs.com/Sungeek/p/9831356.html