

On the server A and the server B the owner and the group of the directory is rsync. On the server A, on the file: /etc/default/rsync I put the value RSYNC_ENABLE to true and I started the rsync daemon with the command: /etc/initd/rsync start
#Linux daemon sync password
I also created on the server A the pid file, and the user rsync with the password rsync. On the server A I created a file nf with the content: uid = rsyncĪnd I created on the server A the file /etc/crets with the content: rsync:rsync Disclaimerīesides the usual disclaimer in the license, we want to specifically emphasize that neither the authors, nor any organization associated with the authors, can or will be held responsible for data-loss caused by possible malfunctions of Lsyncd.I want to synchronize a directory on the server A to a server B. 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. Transfers them to ‘remotehost’ using the rsync-share ‘share’. This watches and rsyncs the local directory /home with all sub-directories and Lsyncd usage examples lsyncd -rsync /home ::share/ 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. Mirror is an asynchronous synchronisation tool that takes use of the inotify notifications much like Lsyncd. GlusterFS and BindFS use a FUSE-Filesystem to interject kernel/userspace filesystem events. DRBD is likely the better option if you are syncing databases. 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. This makes it useful for synchronizing systems that are under heavy load.

Other synchronization toolsĭRBD operates on block device level. Lsyncd is especially useful to sync data from a secure area to a not-so-secure area. Lsyncd is designed to synchronize a slowly changing local directory tree to a remote mirror.

Lsyncd 2.2.1 requires rsync >= 3.1 on all source and target machines. Thus, simple, powerful and flexible configurations are possible.
#Linux daemon sync code
Custom action configs can even be written from scratch in cascading layers ranging from shell scripts to code written in the Lua language. (In contrast, plain rsync performs a move by deleting the old file and then retransmitting the whole file.)įine-grained customization can be achieved through the config file. Rsync+ssh allows for much more efficient synchronization when a file or directory is renamed or moved to a new location in the local tree. Lysncd does not hamper local filesystem performance.Īs an alternative to rsync, Lsyncd can also push changes via rsync+ssh.
#Linux daemon sync install
Lsyncd is comparatively easy to install and does not require new filesystems or block devices. Thus, Lsyncd is a light-weight live mirror solution. The default synchronization method is rsync. Lsyncd collates these events for several seconds and then spawns one or more processes to synchronize the changes to a remote filesystem. Lsyncd uses a filesystem event interface (inotify or fsevents) to watch for changes to local files and directories.

Lsyncd - Live Syncing (Mirror) Daemon Description
