Lsyncd On Centos7
Lsyncd on CentOS/RHEL 7
Install Lsyncd
sudo yum -y install lsyncd
Create the config file
sudo mkdir /etc/lsyncd
sudo cp ./lrsync.lua /etc/lsyncd/lrsync.lua
----
--
-- Simple bidirectional file synchronizer over rsync.
--
settings = {
statusFile = "/tmp/lsyncd.stat",
statusInterval = 1,
}
sync{
default.rsync,
source="/home",
target="/mirror/home",
}
Enable and run
sudo service lsyncd start
sudo systemctl enable lsyncd