I've used lsyncd to sync a local folder to a server I own using rsyncssh with a config file like this:
settings = {
logfile = "/var/log/lsyncd/lsyncd.log",
statusFile = "/var/log/lsyncd/lsyncd.status"
}
sync {
default.rsyncssh,
source = "/Users/user/source",
host = "root@xxx.xxx.xxx.xxx",
targetdir = "/tmp/data",
rsync = { binary = "/usr/local/bin/rsync" }
}
Now, I want to perform a "pull" to sync a local directory on another machine (different network) with that remote server.
I'm using this config file:
settings = {...}
sync {
default.rsync,
source = "root@xxx.xxx.xxx.xxx:/tmp/data",
target = "/home/user/dest",
rsync = { binary = "/usr/local/bin/rsync", _extra = { "-P", "-e", "ssh" } }
}
but I got this error:
Error: failure getting absolute path of [root@xxx.xxx.xxx.xxx:/tmp/data]
Error: Cannot access source directory: root@xxx.xxx.xxx.xxx:/tmp/data
Of course /tmp/data exists, any hint what I'm doing wrong?
Do you know if it is possible to use lsyncd with rsync the way I'm using it to keep a local folder "up-to-date" with a remote source? Or can I use rsyncssh with a remote source?
Thanks!