ayourtch / lsyncd

Automatically exported from code.google.com/p/lsyncd
GNU General Public License v2.0
0 stars 0 forks source link

better docs for basic setup examples ? Config File not found error (example) #68

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.stock install of lsyncd 2.0.4
2.attempting to configure stock config file
3.can't get it to pick up config ?

What is the expected output? What do you see instead?
=====================================================\
[root@gkc1 etc]# lsyncd -log all config=/etc/lsyncd.test 
kernels clocks_per_sec=100
Call: configure()
Error: Cannot find config file at 'config=/etc/lsyncd.test'.

[root@gkc1 etc]# more /etc/lsyncd.*
::::::::::::::
/etc/lsyncd.conf
::::::::::::::
settings = {
   logfile    = "/tmp/lsyncd.log",
   statusFile = "/tmp/lsyncd.status",
   nodaemon   = false,
}
::::::::::::::
/etc/lsyncd.test
::::::::::::::
sync{   
    source="/test/", 
    host="gkc2.domain.com", 
    targetdir="/test/", 
    rsyncOps="-ltuS"
}
[root@gkc1 etc]# 

What version of the product are you using? On what operating system?

LsyncD 2.0.4 on RHEL/CentOS 5.6/64bit

Please provide any additional information below.

simply trying to get a basic config working.  Attempted with just one config 
file (all options above in single config file) but when passing this to lsyncd 
it always returns, "cannot find config file".  It is unclear from docs what 
syntax is required to create a legit / usable config file; and this error isn't 
verbose enough to make it clear why it is failing.

Original issue reported on code.google.com by tim.chip...@gmail.com on 10 Jun 2011 at 1:02

GoogleCodeExporter commented 9 years ago
There is no config= syntax. You just say ./lsyncd and the config file like

./lsyncd /etc/lsyncd.conf

The manual states
 ""Lsyncd 2.0 is designed to be primarily configured through a config file (see below). The config file can thus be the only command line option.

 lsyncd CONFIGFILE""

In my humble opinion, this is not uncear.

Addiotionally in Layer 4 it explains how to make a most simple example.

"To sync a local directory using default rsync behavior just add this to a 
config file:

 sync{default.rsync, source="DIRNAME", target="DIRNAME"}"

Original comment by axk...@gmail.com on 11 Jun 2011 at 2:07

GoogleCodeExporter commented 9 years ago
Hi,

Thanks for the followup.  I did a bit more testing; I think my confusion arose 
from default behaviour of this error message:

[root@gkc1 ~]# lsyncd config 
Error: config:6: no actions specified, use e.g. 'config=default.rsync'.

I believe you might need to do a slight adjustment to your documentation wiki.

At the URL, 
http://code.google.com/p/lsyncd/wiki/Lsyncd20Manual#Layer_4_Configuration:_Defau
lt_Behavior

In the section which begins, "default.rsyncssh", you provide an example which 
reads as follows:

sync{default.rsync, source="/home/user/src/", host="foohost.com", 
targetdir="~/trg/" rsyncOps="-ltus"}

and I wonder, possibly it  should read instead "default.rsyncssh" instead, ie,

sync{default.rsyncssh, source="/home/user/src/", host="foohost.com", 
targetdir="~/trg/" rsyncOps="-ltus"}

As per your advice I've adjusted my syntax and now appear to be getting 
successfull sync behaviour, which is great. 

Tim

Original comment by tim.chip...@gmail.com on 12 Jun 2011 at 2:19