Linux station group rsync synchronization basic tutorial

  
 

Target: Master server program synchronizes programs to multiple child servers

1. Configure sync source

Install rsync:yum -y install rsync xinetd

Enable rsync:vim /etc/xinetd.d/rsync Change disable = yes to disable = no

Configuration: vim /etc/rsyncd.conf
#Sync source ID, feel free to change [site]#program path path = /home /backup # synchronization allows the host to hosts allow = 192.168.1.14hosts deny = * list = trueuid = rootgid = rootread only = false

2. configuration synchronization server

is also mounted rsync, and may Set the filter list and execute:

rsync -avz --delete --exclude-from=/etc/rsync_exclude.lst /var/www/html/server_ip ::site

here Server_ip is the server IP or domain name, site is the synchronization source identifier

In addition, set the timing script. In this way, the station group of the synchronization server can be synchronized from the main server rsync in time.

Copyright © Windows knowledge All Rights Reserved