Rsync + Lsync2014/08/26 |
Install Lsyncd that is a flexible cross-platform synchronization tool.
Rsync is also required.
|
|
[1] | |
[2] | Install Lsyncd on Source Host. |
[root@www ~]#
vi /etc/sysconfig/lsyncd # line 4: uncomment LSYNCD_OPTIONS="-pidfile /var/run/lsyncd.pid /etc/lsyncd.conf"
[root@www ~]#
vi /etc/lsyncd.conf # add follows to the end
settings{
statusFile = "/tmp/lsyncd.stat", statusInterval = 1, } sync{ default.rsync, # source directory source="/var/www/html/", # destination Hostname or IP address:(the name set in rsyncd.conf) target="10.0.0.30::website", # excluding list excludeFrom="/etc/rsync_exclude.lst", } /etc/rc.d/init.d/lsyncd start Starting lsyncd: [ OK ] [root@www ~]# chkconfig lsyncd on
|
[3] |
Make sure files and directories are copied in destination Host.
|
Sponsored Link |
|