<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Live Syncing Daemon Archives - CNERIS</title>
	<atom:link href="https://cneris.com/en/tag/live-syncing-daemon-en/feed/" rel="self" type="application/rss+xml" />
	<link>https://cneris.com/en/tag/live-syncing-daemon-en/</link>
	<description></description>
	<lastBuildDate>Sun, 25 Aug 2024 14:24:25 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.1</generator>
	<item>
		<title>Complete Manual for Lsyncd Usage and Configuration</title>
		<link>https://cneris.com/en/complete-manual-for-lsyncd-usage-and-configuration/</link>
					<comments>https://cneris.com/en/complete-manual-for-lsyncd-usage-and-configuration/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sun, 25 Aug 2024 14:24:25 +0000</pubDate>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Dedicated servers]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Live Syncing Daemon]]></category>
		<category><![CDATA[lsyncd]]></category>
		<guid isPermaLink="false">https://cneris.com/?p=2142</guid>

					<description><![CDATA[<p>1. Introduction to Lsyncd Lsyncd (Live Syncing Daemon) is a tool that combines file system monitoring using inotify with the file synchronization capabilities of rsync. It's ideal for near real-time synchronization between servers, especially when a simple and efficient solution is needed. 2. Installing Lsyncd To install Lsyncd on a Debian/Ubuntu-based system, use the following [...]</p>
<p>The post <a href="https://cneris.com/en/complete-manual-for-lsyncd-usage-and-configuration/">Complete Manual for Lsyncd Usage and Configuration</a> appeared first on <a href="https://cneris.com/en">CNERIS</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>1. Introduction to Lsyncd</strong></p>
<p>Lsyncd (Live Syncing Daemon) is a tool that combines file system monitoring using inotify with the file synchronization capabilities of rsync. It&#8217;s ideal for near real-time synchronization between servers, especially when a simple and efficient solution is needed.</p>
<p><strong>2. Installing Lsyncd</strong></p>
<p>To install Lsyncd on a Debian/Ubuntu-based system, use the following commands:</p>
<div class="dark bg-gray-950 rounded-md border-[0.5px] border-token-border-medium">
<div class="flex items-center relative text-token-text-secondary bg-token-main-surface-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-md"></div>
<div class="overflow-y-auto p-4" dir="ltr"><code class="!whitespace-pre hljs language-bash">sudo apt-get update<br />
sudo apt-get install lsyncd<br />
</code></div>
</div>
<p>On Red Hat/CentOS-based systems, use:</p>
<div class="dark bg-gray-950 rounded-md border-[0.5px] border-token-border-medium">
<div class="flex items-center relative text-token-text-secondary bg-token-main-surface-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-md"></div>
<div class="overflow-y-auto p-4" dir="ltr"><code class="!whitespace-pre hljs language-bash">sudo yum install epel-release<br />
sudo yum install lsyncd<br />
</code></div>
</div>
<p><strong>3. Basic Configuration of Lsyncd</strong></p>
<p>Lsyncd is configured using a Lua configuration file. The most common configuration file is located at <code>/etc/lsyncd/lsyncd.conf.lua</code>.</p>
<p>Basic configuration example:</p>
<div class="dark bg-gray-950 rounded-md border-[0.5px] border-token-border-medium">
<div class="flex items-center relative text-token-text-secondary bg-token-main-surface-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-md"></div>
<div class="overflow-y-auto p-4" dir="ltr"><code class="!whitespace-pre hljs language-lua">settings {<br />
   logfile    = <span class="hljs-string">"/var/log/lsyncd/lsyncd.log"</span>,<br />
   statusFile = <span class="hljs-string">"/var/log/lsyncd/lsyncd-status.log"</span>,<br />
   nodaemon   = <span class="hljs-literal">false</span>,<br />
}</p>
<p>sync {<br />
   default.rsyncssh,<br />
   source    = <span class="hljs-string">"/local/path/to/sync"</span>,<br />
   host      = <span class="hljs-string">"user@remote_server"</span>,<br />
   targetdir = <span class="hljs-string">"/remote/destination/path"</span>,<br />
   rsyncOpts = {<span class="hljs-string">"-avz"</span>},<br />
   ssh = {<br />
      port = <span class="hljs-number">22</span>,<br />
      password = <span class="hljs-string">"user_password"</span><br />
   }<br />
}<br />
</code></div>
</div>
<p><strong>4. Explanation of Key Parameters</strong></p>
<ul>
<li><code>logfile</code>: File where Lsyncd logs are stored.</li>
<li><code>statusFile</code>: File where synchronization status is saved.</li>
<li><code>nodaemon</code>: If set to <code>false</code>, Lsyncd runs in the background.</li>
<li><code>source</code>: Local folder to be synchronized.</li>
<li><code>host</code>: User and address of the remote server.</li>
<li><code>targetdir</code>: Destination directory on the remote server.</li>
<li><code>rsyncOpts</code>: Options passed to rsync for synchronization.</li>
<li><code>ssh</code>: SSH settings, such as port and password.</li>
</ul>
<p><strong>5. Running and Monitoring Lsyncd</strong></p>
<p>To start Lsyncd, simply run:</p>
<div class="dark bg-gray-950 rounded-md border-[0.5px] border-token-border-medium">
<div class="flex items-center relative text-token-text-secondary bg-token-main-surface-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-md"></div>
<div class="overflow-y-auto p-4" dir="ltr"><code class="!whitespace-pre hljs language-bash">sudo lsyncd /etc/lsyncd/lsyncd.conf.lua<br />
</code></div>
</div>
<p>You can verify that it&#8217;s working by checking the log file specified in the configuration (<code>/var/log/lsyncd/lsyncd.log</code>).</p>
<p><strong>6. Advanced Usage</strong></p>
<p>If you need more advanced configurations, you can add exclusions, perform custom actions before or after synchronization, or handle multiple synchronizations simultaneously in the configuration file.</p>
<p><strong>7. Security Considerations</strong></p>
<p>It&#8217;s important to consider the security of password authentication. For a more secure environment, it&#8217;s recommended to use SSH key-based authentication instead of passwords.</p>
<p><strong>8. Conclusion</strong></p>
<p>Lsyncd is a powerful and flexible tool for real-time file synchronization between servers. With proper configuration, you can keep your servers efficiently synchronized.</p>
<p>The post <a href="https://cneris.com/en/complete-manual-for-lsyncd-usage-and-configuration/">Complete Manual for Lsyncd Usage and Configuration</a> appeared first on <a href="https://cneris.com/en">CNERIS</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cneris.com/en/complete-manual-for-lsyncd-usage-and-configuration/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
