25% off on first invoice for all services*

SPRING SALE

Use coupon

*Offer valid for new customers only

25% off on first invoice for all services*

SPRING SALE

Use coupon

*Offer valid for new customers only

Need help?

Our experts have had an average response time of 11.43 minutes in March 2024 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

How do I install Lsyncd CentOS?

by | Dec 20, 2019

Would you like to sync your data using lsyncd on CentOS? We will help you.

In the internet industry, having an additional backup set will be useful in data recovery.

Here at Bobcares, we often receive requests related to syncing data and also to install daemons like lsyncd as a part of our Server Management Services.

Today, let’s see how our Support Engineers install the lsyncd and fix its common errors.

 

Explore more about Lsyncd CentOS

Lsyncd is abbreviated as “Live Syncing Daemon“.

It is a rsync and SSH-based tool. And it mainly monitors the changes to local files and directories, then syncs those changes to a specified destination.

We use this simple way to keep the local directory automatically synchronized with the servers.

 

How we install Lsyncd CentOS?

Let’s now go through the steps of how our Support Engineers install lsyncd in CentOS.

 

1. Install EPEL via yum

Initially, we install the EPEL repository using the command

yum install epel-release

 

2. Update the package

Then, we ensure that the packages are updated. So we run the below command to run an update if any packages are not updated.

yum -y update

 

3. Installing and configuring Lsyncd CentOS

Now, we install the lsyncd by running the command

yum -y install lsyncd

After installing it, we modify the configuration file from the path /etc/lsyncd.conf as below.

----
-- User configuration file for lsyncd.
--
-- Simple example for default rsync.
--
settings {
statusFile = "/tmp/lsyncd.stat",
statusInterval = 1,
}

sync {
default.rsync,
source="/var/www/html",
target="192.168.1.14:/var/www/html",
rsync={rsh ="/usr/bin/ssh -l root -i /root/.ssh/id_rsa",}
}

And then we enable and start the lsyncd through below commands:

systemctl enable lsyncd

systemctl start lsyncd

 

5. Checking the status

Finally, we check the lsyncd status Report as below.

Lsyncd CentOS

 

Common errors with Lsyncd CentOS

Let’s have a look into a few common errors that we came across and find our how our Support Engineers fix it.

 

Unable to restart lsyncd

Recently, one of our customers had approached us telling that he was not able to start the lsyncd and received the below error.

lsyncd.service - Live Syncing (Mirror) Daemon
Loaded: loaded (/usr/lib/systemd/system/lsyncd.service; disabled; vendor preset: disabled)
Active: inactive (dead)

Aug 3 19:22:19 backupsteve systemd: Started Live Syncing (Mirror)
Daemon.
Aug 3 19:22:19 backupsteve systemd: Starting Live Syncing (Mirror) Daemon...
Aug 3 19:22:19 backupsteve sh: Error: failure getting absolute path of [/usr/local/cherbles/archive/plause/backups/dr551-prod/sftpdrop2/latestbackup/]
Aug 3 19:22:19 backupsteve sh: Error: Cannot access source directory: /usr/local/cherbles/archive/plause/backups/dr551-prod/sftpdrop2/latestbackup/

Our Support Engineers investigated this problem and found the error with the configuration file. We saw that there was an error in the cod.

And finally, we fixed this by updating the configuration file.

 

[Need any further assistance with lsycnd? We’ll help you]

 

Conclusion

In short, the lsyncd keeps monitoring the directories for any updates, then it syncs all the changes to the specified destination. Today, we saw how our Support Engineers install the Lsyncd and fix its common errors.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Categories

Tags

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF