Efficiently sync local directories with remote machine via rsyncd software.
Lsyncd is a lightweight live mirror solution that's easy to install and use, and it fits well with most systems. Additionally, you can access detailed command line options by typing "lsyncd --help."
This software is designed to synchronize a local directory tree with a low profile of expected changes to a remote mirror. On the receiver's side, rsyncd can be configured to change the uid/gid of the file. Lsyncd is ideal for syncing data from a secure area to a not-so-secure area. For example, it can be set up as a one-way connection to allow employees to publish their files to a publicly accessible web server.
However, do not use Lsyncd for files with active file handles, such as database files, or for directories where many changes occur, such as mail or news servers. In these cases, DRBD may be a more suitable solution.
Lsyncd vs. DRBD: DRBD operates on a block device level, making it suitable for synchronizing systems that are under heavy loads. In contrast, Lsyncd does not require you to change block devices and/or mount points. It also allows you to change uid/gid of transferred files and separates the receiver through the one-way nature of rsync. However, Lsyncd may not be suitable for databases since a file change can result in a full file transfer (at least for binary files), and a directory rename results in transferring the entire directory.
Lsyncd vs. incron: Incron does not (yet) support recursive directory watching, making it unsuitable for the needs described. A different approach would have been to extend incron, but the developers decided to stick to the "NIH" principle (Not Invented Here) since extending the C++ solution seemed too tedious.
Lsyncd vs. FUSE: Another interesting idea is to write a daemon that provides a shadow file system through FUSE. When accessing a file, the data is synced to a local file as well as the remote file. With this approach, inotify could be replaced. BindFS does this for local mirroring. However, this idea was discarded because it would have a negative impact on normal operations' performance.
Lsyncd vs. cron: If you prefer using cron to call rsync over the whole directory tree periodically after every 'X' hours/minutes/seconds, go for it. However, the developers don't like this approach compared to the simplicity and efficiency of Lsyncd.
Version 1.25: N/A