[root@test-ftp-server ftpdata]# ll
total 100
drwx------ 2 root root 16384 Sep 13 17:30 lost+found
-rw-r--r-- 1 root root 84624 Apr 12 2017 lsyncd-2.2.2-1.el7.x86_64.rpm
[root@test-ftp-server ftpdata]# yum install lsyncd-2.2.2-1.el7.x86_64.rpm
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Examining lsyncd-2.2.2-1.el7.x86_64.rpm: lsyncd-2.2.2-1.el7.x86_64
Marking lsyncd-2.2.2-1.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package lsyncd.x86_64 0:2.2.2-1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================================================================
Package Arch Version Repository Size
======================================================================================================================================================
Installing:
lsyncd x86_64 2.2.2-1.el7 /lsyncd-2.2.2-1.el7.x86_64 227 k
Transaction Summary
======================================================================================================================================================
Install 1 Package
Total size: 227 k
Installed size: 227 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : lsyncd-2.2.2-1.el7.x86_64 1/1
yum-server | 4.1 kB 00:00:00
Verifying : lsyncd-2.2.2-1.el7.x86_64 1/1
Installed:
lsyncd.x86_64 0:2.2.2-1.el7
Complete!
[root@test-ftp-server ftpdata]#
[root@test-ftp-server ftpdata]# cd
[root@test-ftp-server ~]#
[root@test-ftp-server ~]# sysctl -a | grep max_queued_events
fs.inotify.max_queued_events = 16384
sysctl: reading key "net.ipv6.conf.all.stable_secret"
sysctl: reading key "net.ipv6.conf.default.stable_secret"
sysctl: reading key "net.ipv6.conf.eth0.stable_secret"
sysctl: reading key "net.ipv6.conf.lo.stable_secret"
[root@test-ftp-server ~]# sysctl -a | grep max_user_watches
fs.epoll.max_user_watches = 3354173
fs.inotify.max_user_watches = 8192
sysctl: reading key "net.ipv6.conf.all.stable_secret"
sysctl: reading key "net.ipv6.conf.default.stable_secret"
sysctl: reading key "net.ipv6.conf.eth0.stable_secret"
sysctl: reading key "net.ipv6.conf.lo.stable_secret"
[root@test-ftp-server ~]# sysctl -a | grep max_user_instances
fs.inotify.max_user_instances = 128
sysctl: reading key "net.ipv6.conf.all.stable_secret"
sysctl: reading key "net.ipv6.conf.default.stable_secret"
sysctl: reading key "net.ipv6.conf.eth0.stable_secret"
sysctl: reading key "net.ipv6.conf.lo.stable_secret"
[root@test-ftp-server ~]#
[root@test-ftp-server ~]# vim /etc/sysctl.conf
[root@test-ftp-server ~]#
[root@test-ftp-server ~]# systemctl enable lsyncd.service
Created symlink from /etc/systemd/system/multi-user.target.wants/lsyncd.service to /usr/lib/systemd/system/lsyncd.service.
[root@test-ftp-server ~]#
[root@test-ftp-server ~]#
[root@test-ftp-server ~]# systemctl restart lsyncd.service
[root@test-ftp-server ~]# systemctl status lsyncd.service
● lsyncd.service - Live Syncing (Mirror) Daemon
Loaded: loaded (/usr/lib/systemd/system/lsyncd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sun 2020-09-13 17:39:09 CST; 5s ago
Process: 34915 ExecStart=/usr/bin/lsyncd -nodaemon $LSYNCD_OPTIONS (code=exited, status=255)
Main PID: 34915 (code=exited, status=255)
Sep 13 17:39:09 test-ftp-server systemd[1]: Started Live Syncing (Mirror) Daemon.
Sep 13 17:39:09 test-ftp-server systemd[1]: Starting Live Syncing (Mirror) Daemon...
Sep 13 17:39:09 test-ftp-server lsyncd[34915]: Error: failure getting absolute path of [/var/www/html]
Sep 13 17:39:09 test-ftp-server lsyncd[34915]: Error: Cannot access source directory: /var/www/html
Sep 13 17:39:09 test-ftp-server systemd[1]: lsyncd.service: main process exited, code=exited, status=255/n/a
Sep 13 17:39:09 test-ftp-server systemd[1]: Unit lsyncd.service entered failed state.
Sep 13 17:39:09 test-ftp-server systemd[1]: lsyncd.service failed.
[root@test-ftp-server ~]#
[root@test-ftp-server ~]# ll /var/www/html\
> ^C
[root@test-ftp-server ~]# ll /var/www/html
ls: cannot access /var/www/html: No such file or directory
[root@test-ftp-server ~]#
[root@test-ftp-server ~]# rpm -ql lsyncd
/etc/logrotate.d/lsyncd
/etc/lsyncd.conf
/etc/sysconfig/lsyncd
/usr/bin/lsyncd
/usr/lib/systemd/system/lsyncd.service
/usr/share/doc/lsyncd-2.2.2
/usr/share/doc/lsyncd-2.2.2/ChangeLog
/usr/share/doc/lsyncd-2.2.2/examples
/usr/share/doc/lsyncd-2.2.2/examples/lalarm.lua
/usr/share/doc/lsyncd-2.2.2/examples/lbash.lua
/usr/share/doc/lsyncd-2.2.2/examples/lecho.lua
/usr/share/doc/lsyncd-2.2.2/examples/lftp.lua
/usr/share/doc/lsyncd-2.2.2/examples/lgforce.lua
/usr/share/doc/lsyncd-2.2.2/examples/limagemagic.lua
/usr/share/doc/lsyncd-2.2.2/examples/lpostcmd.lua
/usr/share/doc/lsyncd-2.2.2/examples/lrsync.lua
/usr/share/doc/lsyncd-2.2.2/examples/lrsyncssh.lua
/usr/share/doc/lsyncd-2.2.2/examples/lsayirc.lua
/usr/share/licenses/lsyncd-2.2.2
/usr/share/licenses/lsyncd-2.2.2/COPYING
/usr/share/man/man1/lsyncd.1.gz
/var/log/lsyncd
[root@test-ftp-server ~]#
[root@test-ftp-server ~]# cat /etc/sysconfig/lsyncd
LSYNCD_OPTIONS="/etc/lsyncd.conf"
[root@test-ftp-server ~]#
[root@test-ftp-server ~]# cat /etc/lsyncd.conf
----
-- User configuration file for lsyncd.
--
-- Simple example for default rsync, but executing moves through on the target.
--
-- For more examples, see /usr/share/doc/lsyncd*/examples/
--
sync{default.rsyncssh, source="/var/www/html", host="localhost", targetdir="/tmp/htmlcopy/"}
[root@test-ftp-server ~]#
rsync
[root@prod-lsync-server01 ~]# systemctl status rsyncd.service
● rsyncd.service - fast remote file copy program daemon
Loaded: loaded (/usr/lib/systemd/system/rsyncd.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2020-11-22 20:02:41 CST; 2 days ago
Main PID: 113055 (rsync)
CGroup: /system.slice/rsyncd.service
├─ 47386 /usr/bin/rsync --daemon --no-detach
├─ 47388 /usr/bin/rsync --daemon --no-detach
├─ 71524 /usr/bin/rsync --daemon --no-detach
├─ 71528 /usr/bin/rsync --daemon --no-detach
├─ 72294 /usr/bin/rsync --daemon --no-detach
├─ 72295 /usr/bin/rsync --daemon --no-detach
├─ 72740 /usr/bin/rsync --daemon --no-detach
├─ 72746 /usr/bin/rsync --daemon --no-detach
├─ 74032 /usr/bin/rsync --daemon --no-detach
├─ 74042 /usr/bin/rsync --daemon --no-detach
├─ 77328 /usr/bin/rsync --daemon --no-detach
├─ 77333 /usr/bin/rsync --daemon --no-detach
├─ 77353 /usr/bin/rsync --daemon --no-detach
├─ 77359 /usr/bin/rsync --daemon --no-detach
├─ 77361 /usr/bin/rsync --daemon --no-detach
├─ 77362 /usr/bin/rsync --daemon --no-detach
├─ 77449 /usr/bin/rsync --daemon --no-detach
├─ 77450 /usr/bin/rsync --daemon --no-detach
├─ 77453 /usr/bin/rsync --daemon --no-detach
├─ 77454 /usr/bin/rsync --daemon --no-detach
├─ 77455 /usr/bin/rsync --daemon --no-detach
├─ 77456 /usr/bin/rsync --daemon --no-detach
└─113055 /usr/bin/rsync --daemon --no-detach
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
[root@prod-lsync-server01 ~]# systemctl status lsyncd.service
● lsyncd.service - Live Syncing (Mirror) Daemon
Loaded: loaded (/usr/lib/systemd/system/lsyncd.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2020-11-25 01:59:02 CST; 8h ago
Main PID: 190606 (lsyncd)
CGroup: /system.slice/lsyncd.service
├─ 70451 /usr/bin/rsync -gvzsolptD --bwlimit=200 --password-file=/etc/rsyncd.password -r --delete --ignore-errors...
├─ 77329 /usr/bin/rsync -gvzsolptD --bwlimit=200 --password-file=/etc/rsyncd.password -r --delete --ignore-errors...
├─ 77406 /usr/bin/rsync -gvzsolptD --bwlimit=200 --password-file=/etc/rsyncd.password -r --delete --ignore-errors...
└─190606 /usr/bin/lsyncd -nodaemon /etc/lsyncd.conf
Nov 25 10:54:32 prod-lsync-server01 lsyncd[190606]: /data/nodes/0/indices/e-_8CL81SF2lfQtevlhBlQ/1/index/_5zmx.cfe
Nov 25 10:54:32 prod-lsync-server01 lsyncd[190606]: /data/nodes/0/indices/e-_8CL81SF2lfQtevlhBlQ/1/index/_5zmx.cfs
Nov 25 10:54:32 prod-lsync-server01 lsyncd[190606]: /data/nodes/0/indices/e-_8CL81SF2lfQtevlhBlQ/1/index/_5zmx.si
Nov 25 10:54:32 prod-lsync-server01 lsyncd[190606]: /data/nodes/0/indices/e-_8CL81SF2lfQtevlhBlQ/1/index/_5zmy.cfe
Nov 25 10:54:32 prod-lsync-server01 lsyncd[190606]: /data/nodes/0/indices/e-_8CL81SF2lfQtevlhBlQ/1/index/_5zmy.cfs
Nov 25 10:54:32 prod-lsync-server01 lsyncd[190606]: /data/nodes/0/indices/e-_8CL81SF2lfQtevlhBlQ/1/index/_5zmy.si
Nov 25 10:54:32 prod-lsync-server01 lsyncd[190606]: /data/nodes/0/indices/e-_8CL81SF2lfQtevlhBlQ/0/index/_65q1.cfe
Nov 25 10:54:32 prod-lsync-server01 lsyncd[190606]: /data/nodes/0/indices/e-_8CL81SF2lfQtevlhBlQ/0/index/_65pi.cfe
Nov 25 10:55:01 prod-lsync-server01 lsyncd[190606]: data/nodes/0/indices/e-_8CL81SF2lfQtevlhBlQ/0/index/_65p8.cfe
Nov 25 10:55:01 prod-lsync-server01 lsyncd[190606]: data/nodes/0/indices/e-_8CL81SF2lfQtevlhBlQ/0/index/_65p8.cfs
[root@prod-lsync-server01 ~]#