Need help with lsyncd?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

axkibe
4.4K Stars 409 Forks GNU General Public License v2.0 803 Commits 138 Opened issues

Description

Lsyncd (Live Syncing Daemon) synchronizes local directories with remote targets

Services available

!
?

Need anything else?

Contributors list

# 29,314
C
Shell
Lua
Node.js
679 commits
# 167,302
C
Shell
Lua
23 commits
# 55,242
Lua
c-plus-...
gRPC
real-ti...
12 commits
# 12,911
python-...
travis
circlec...
azure-p...
3 commits
# 140,024
seleniu...
Lua
ntp
Perl
3 commits
# 156,110
Lua
Babel
Ada
pkcs11
3 commits
# 6,858
C++
interpr...
interpr...
Lua
3 commits
# 343,964
Shell
C
Lua
3 commits
# 110,465
C
Shell
Lua
2 commits
# 72,490
PHP
Google
Nette
zend-fr...
2 commits
# 146,794
D
Lua
vlc
Twitch
2 commits
# 174,100
Lua
sensu
nagios
Linux
1 commit
# 163,038
sed
Lua
Markdow...
Redis
1 commit
# 429,887
C
Shell
Lua
wm
1 commit
# 3,062
Homebre...
Ruby
C
ncurses
1 commit
# 244,168
Ruby
Shell
Lua
1 commit
# 450,677
C
Shell
Lua
1 commit
# 228,220
Shell
C
Lua
ssl
1 commit
# 96,449
Shell
hubot
C
Lua
1 commit
# 7,897
MySQL
Perl
ips
fail2ba...
1 commit

Lsyncd -- Live Syncing (Mirror) Daemon

Description

Lsyncd watches a local directory trees event monitor interface (inotify or fsevents). It aggregates and combines events for a few seconds and then spawns one (or more) process(es) to synchronize the changes. By default this is rsync. Lsyncd is thus a light-weight live mirror solution that is comparatively easy to install not requiring new filesystems or block devices and does not hamper local filesystem performance.

Rsync+ssh is an advanced action configuration that uses a SSH to act file and directory moves directly on the target instead of re-transmitting the move destination over the wire.

Fine-grained customization can be achieved through the config file. Custom action configs can even be written from scratch in cascading layers ranging from shell scripts to code written in the Lua language. This way simple, powerful and flexible configurations can be acheived. See the manual for details.

Lsyncd 2.2.1 requires rsync >= 3.1 on all source and target machines.

License: GPLv2 or any later GPL version.

When to use

Lsyncd is designed to synchronize a local directory tree with low profile of expected changes to a remote mirror. Lsyncd is especially useful to sync data from a secure area to a not-so-secure area.

Other synchronization tools

DRBD operates on block device level. This makes it useful for synchronizing systems that are under heavy load. Lsyncd on the other hand does not require you to change block devices and/or mount points, allows you to change uid/gid of the transferred files, separates the receiver through the one-way nature of rsync. DRBD is likely the better option if you are syncing databases.

GlusterFS and BindFS use a FUSE-Filesystem to interject kernel/userspace filesystem events.

Mirror is an asynchronous synchronisation tool that takes use of the inotify notifications much like Lsyncd. The main differences are: it is developed specifically for master-master use, thus running on a daemon on both systems, uses its own transportation layer instead of rsync and is Java instead of Lsyncd's C core with Lua scripting.

Lsyncd usage examples

lsyncd -rsync /home remotehost.org::share/

This watches and rsyncs the local directory /home with all sub-directories and transfers them to 'remotehost' using the rsync-share 'share'.

lsyncd -rsyncssh /home remotehost.org backup-home/

This will also rsync/watch '/home', but it uses a ssh connection to make moves local on the remotehost instead of re-transmitting the moved file over the wire.

Some more complicated examples, tips and tricks you can find in the manual.

Disclaimer

Besides the usual disclaimer in the license, we want to specifically emphasize that the authors, and any organizations the authors are associated with, can not be held responsible for data-loss caused by possible malfunctions of Lsyncd.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.