[root@test-ftp-server ftpdata]# lltotal 100drwx------ 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.rpmLoaded plugins: product-id, search-disabled-repos, subscription-managerThis 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_64Marking lsyncd-2.2.2-1.el7.x86_64.rpm to be installedResolving Dependencies--> Running transaction check---> Package lsyncd.x86_64 0:2.2.2-1.el7 will be installed--> Finished Dependency ResolutionDependencies Resolved======================================================================================================================================================Package Arch Version Repository Size======================================================================================================================================================Installing:lsyncd x86_64 2.2.2-1.el7 /lsyncd-2.2.2-1.el7.x86_64 227 kTransaction Summary======================================================================================================================================================Install 1 PackageTotal size: 227 kInstalled size: 227 kIs this ok [y/d/N]: yDownloading packages:Running transaction checkRunning transaction testTransaction test succeededRunning transactionInstalling : lsyncd-2.2.2-1.el7.x86_64 1/1yum-server | 4.1 kB 00:00:00Verifying : lsyncd-2.2.2-1.el7.x86_64 1/1Installed:lsyncd.x86_64 0:2.2.2-1.el7Complete![root@test-ftp-server ftpdata]#[root@test-ftp-server ftpdata]# cd[root@test-ftp-server ~]#[root@test-ftp-server ~]# sysctl -a | grep max_queued_eventsfs.inotify.max_queued_events = 16384sysctl: 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_watchesfs.epoll.max_user_watches = 3354173fs.inotify.max_user_watches = 8192sysctl: 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_instancesfs.inotify.max_user_instances = 128sysctl: 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.serviceCreated 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) DaemonLoaded: 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 agoProcess: 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/htmlSep 13 17:39:09 test-ftp-server systemd[1]: lsyncd.service: main process exited, code=exited, status=255/n/aSep 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/htmlls: 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/lsyncdLSYNCD_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 daemonLoaded: 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 agoMain 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-detachWarning: 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) DaemonLoaded: loaded (/usr/lib/systemd/system/lsyncd.service; enabled; vendor preset: disabled)Active: active (running) since Wed 2020-11-25 01:59:02 CST; 8h agoMain 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.confNov 25 10:54:32 prod-lsync-server01 lsyncd[190606]: /data/nodes/0/indices/e-_8CL81SF2lfQtevlhBlQ/1/index/_5zmx.cfeNov 25 10:54:32 prod-lsync-server01 lsyncd[190606]: /data/nodes/0/indices/e-_8CL81SF2lfQtevlhBlQ/1/index/_5zmx.cfsNov 25 10:54:32 prod-lsync-server01 lsyncd[190606]: /data/nodes/0/indices/e-_8CL81SF2lfQtevlhBlQ/1/index/_5zmx.siNov 25 10:54:32 prod-lsync-server01 lsyncd[190606]: /data/nodes/0/indices/e-_8CL81SF2lfQtevlhBlQ/1/index/_5zmy.cfeNov 25 10:54:32 prod-lsync-server01 lsyncd[190606]: /data/nodes/0/indices/e-_8CL81SF2lfQtevlhBlQ/1/index/_5zmy.cfsNov 25 10:54:32 prod-lsync-server01 lsyncd[190606]: /data/nodes/0/indices/e-_8CL81SF2lfQtevlhBlQ/1/index/_5zmy.siNov 25 10:54:32 prod-lsync-server01 lsyncd[190606]: /data/nodes/0/indices/e-_8CL81SF2lfQtevlhBlQ/0/index/_65q1.cfeNov 25 10:54:32 prod-lsync-server01 lsyncd[190606]: /data/nodes/0/indices/e-_8CL81SF2lfQtevlhBlQ/0/index/_65pi.cfeNov 25 10:55:01 prod-lsync-server01 lsyncd[190606]: data/nodes/0/indices/e-_8CL81SF2lfQtevlhBlQ/0/index/_65p8.cfeNov 25 10:55:01 prod-lsync-server01 lsyncd[190606]: data/nodes/0/indices/e-_8CL81SF2lfQtevlhBlQ/0/index/_65p8.cfs[root@prod-lsync-server01 ~]#
