You need to install this package:
$ lsyncd -log all -nodaemon -rsyncssh <local_path> <user>@<ip> <remote_path>
An example is to sync a folder with code:
$ lsyncd -delay 1 -log all -nodaemon -rsyncssh app hetzner /data/zet/source/src
It is possible to create a config file as explained in the docs, one example:
sync {
default.rsyncssh,
source="/home/facien/win/gitRepos/zet/zet.space",
host="fran",
exclude="node_modules",
targetdir="/data/zet/web",
delay="1"
}
You can invoke the last config file without daemon as:
$ lsyncd -nodaemon lsync.conf