Lsyncd is tool in linux to sync two directories real time. This works in a way when ever any change happen in source through OS thread it will get notify to Lsyncd program. Lsyncd internally uses rsync to finish the task.In this tutorial we are going to see how to sync frequently changing files using lsyncd. We need to use below settings to achieve this

settings {
logfile = "/var/log/lsyncd/lsyncd.log",
statusFile = "/var/log/lsyncd/lsyncd.status",
inotifyMode="Modify"
}


sync {
    default.rsync,
    source    = "/sourcefolder/",
    target    = "/destinationfolder/",
    delay     = 0
}

Important configuration here is inotifyMode in settings,This parameter specifies what kind of changes to listen to do the action