Ubuntu 18.04
Sponsored Link

Lsync + Rsync : Sync Files timely2018/11/29

 
Install Lsyncd that is a flexible cross-platform synchronization tool.
[1]
Run Rsync daemon on remote destination host, refer to here.
On this example, use the same settings of synchronization with the example above link.
[2] In addition to settings of [1], Install and configure Lsyncd on source host to sync files and directories timely.
root@dlp:~#
apt -y install lsyncd
root@dlp:~#
mkdir /etc/lsyncd

root@dlp:~#
vi /etc/lsyncd/lsyncd.conf.lua
# create new

settings{
    statusFile = "/tmp/lsyncd.stat",
    statusInterval = 1,
}
sync{
    default.rsync,
    # source directory
    source="/root/work/",
    # destination Hostname or IP address:(the name set in rsyncd.conf)
    target="10.0.0.51::backup",
    # excluding list
    excludeFrom="/etc/rsync_exclude.lst",
}

root@dlp:~#
systemctl restart lsyncd

[3]
Make sure files and directories are copied timely on destination Host.

Matched Content