Lsync : Synchronize Files / Directories2025/10/06 |
|
Install Lsync to configure live mirroring files and directories with Rsync + Lsync. |
|
| [1] |
Configure rsyncd service on copy target Host, refer to here. +----------------------+ | +----------------------+ | [dlp.srv.world] |10.0.0.30 | 10.0.0.51| [node01.srv.world] | | lsyncd +----------+----------+ rsyncd | | /home/work/* | -------------> | /home/backup/* | +----------------------+ live copy +----------------------+ |
| [2] | Install Lsync on copy source Host. |
|
root@dlp:~#
root@dlp:~# apt -y install lsyncd mkdir /etc/lsyncd
root@dlp:~#
vi /etc/lsyncd/lsyncd.conf.lua # create new
settings{
statusFile = "/run/lsyncd.stat",
statusInterval = 1,
}
sync{
default.rsync,
# specify copy source directory
source="/home/work/",
# specify copy target Hostname or IP address : (the name set in rsyncd.conf)
target="node01.srv.world::backup",
# specify exclude file list
excludeFrom="/etc/rsync_exclude.lst",
}
systemctl restart lsyncd |
| [3] |
That's OK. |
| Sponsored Link |
|
|