lsyncd

daemon to synchronize local directories using rsync
  https://github.com/axkibe/lsyncd
  2
  1 review



Lsyncd (Live syncing mirror daemon) uses rsync to synchronize local directories with a remote machine running rsyncd. Lsyncd watches multiple directories trees through inotify. The first step after adding the watches is to rsync all directories with the remote host, and then sync single file by collecting the inotify events. So lsyncd is a light-weight live mirror solution that should be easy to install and use while blending well with your system.
Latest reviews
5
disabati 2 years ago

Lsyncd is maybe the most amazing Linux utility available that gets the least amount of attention. Using the power of rsync and inotify to create an amazing one or two-way recursive folder sync. On all my PC builds, my data is stored on a dedicated drive that can be transported from one machine to the next. Of course, the risk is disk failure. That's where lsyncd comes into play. I used to mirror my data to a NAS configured in RAID 1, thereby providing double redundancy (three data copies). With NVME drives, I simply use lsyncd to mirror to an NVME drive that hangs off of my PC using a USB 3.0 port. Single redundancy (two data copies), but good enough and it greatly simplifies the backup setup while significantly reducing the energy consumption required by the NAS (not to mention the NAS cost). I'm an old-school unix guy with no GUI ability. If I had that ability, I would write a front-end to Lsyncd for providing Dropbox-like one or two-way syncing of files (it should be easy-peasy for those with the skill). Til then, create your own script in /etc/lsyncd/lsyncd.conf.lua, define your source & target directories, and if writing to a USB drive, add a "sleep 10" command to the /etc/init.d/lsyncd shell to provide enough time for the USB drive(s) to mount.