Debian 7.0
Sponsored Link

Lsync - Realtime Mirroring
2013/06/05
 
Install Lsync that is a flexible cross-platform synchronization tool. Rsync is also required, so in addition to the setting of rsync, Configure lsyncd.
[1] Install lsyncd in Source Host
root@www:~#
aptitude -y install lsyncd
root@www:~#
mkdir /etc/lsyncd

root@www:~#
vi /etc/lsyncd/lsyncd.conf.lua
settings = {
    statusFile = "/tmp/lsyncd.stat",
    statusInterval = 1,
}
sync{
    default.rsync,
   
# source directory

    source="/var/www/",
   
# destination Hostname or IP address:(the name set in rsyncd.conf)

    target="10.0.0.30::site",
   
# rsync's option

    rsyncOpts="-az",
   
# add: excluding list

    excludeFrom="/etc/rsync_exclude.lst",
}
root@www:~#
/etc/init.d/lsyncd start

[2]
Make sure files and directories are copied in destination Host.

Matched Content