diff --git a/manual3/config/file/index.md b/manual3/config/file/index.md index 5edb194..b871db8 100644 --- a/manual3/config/file/index.md +++ b/manual3/config/file/index.md @@ -13,15 +13,12 @@ For example, the following code will instruct Lsyncd to log into ```/tmp/lsyncd. {% highlight lua %} settings { - logfile = "/tmp/lsyncd.log", - statusFile = "/tmp/lsyncd.status", + logfile = '/tmp/lsyncd.log', + statusFile = '/tmp/lsyncd.status', nodaemon = true, } {% endhighlight %} -**Caution** -If you are upgrading from 2.0.x, please notice that `settings` became a function from a variable, so you **MUST** delete the equal sign '=' between `settings` and the `{`. - Valid keys for settings are: @@ -30,18 +27,6 @@ Valid keys for settings are: - - - - - - - + - - @@ -232,21 +232,21 @@ Below is a table of options for the ```rsync``` parameter. Please have a look at @@ -301,14 +301,14 @@ Below is a table of options for the ```rsync``` parameter. Please have a look at @@ -322,14 +322,14 @@ Below is a table of options for the ```rsync``` parameter. Please have a look at @@ -337,7 +337,7 @@ Below is a table of options for the ```rsync``` parameter. Please have a look at - -
= FILENAME logs into this file -
pidfile - = - FILENAME - logs PID into this file -
nodaemon - = - BOOL - does not detach
statusFile @@ -66,12 +51,6 @@ Valid keys for settings are: = STRING syslog identification (tag), default "lsyncd" -
insist - = - BOOL - keep running at startup although one or more targets failed due to not being reachable.
inotifyMode diff --git a/manual3/config/layer4/index.md b/manual3/config/layer4/index.md index d70b428..ea1ebb2 100644 --- a/manual3/config/layer4/index.md +++ b/manual3/config/layer4/index.md @@ -1,7 +1,7 @@ --- layout: default3 title: "Config Layer 4: Default Config" -short: "Config Layer 4" +short: "Config Layer 4" --- You can simply choose from a set of three default implementations which are: __rsync__, __rsyncssh__ and __direct__. @@ -49,7 +49,7 @@ sync { default.rsync, source = "/home/user/src/", target = "foohost.com:~/trg/", - delay = 15, + delay = 15, rsync = { binary = "/usr/local/bin/rsync", archive = true, @@ -67,7 +67,7 @@ Below is a table of options for the ```rsync``` parameter. Please have a look at default value comment
acls = BOOL @@ -172,18 +172,18 @@ Below is a table of options for the ```rsync``` parameter. Please have a look at
exclude +
filter = - PATTERN - - TABLE of PATTERNs also allowed + LIST of RULEs + +
excludeFrom +
filterFrom = FILENAME - +
executability @@ -203,7 +203,7 @@ Below is a table of options for the ```rsync``` parameter. Please have a look at
groupmap = STRING - + (Lsyncd >= 2.2.0)
= BOOL false - +
ipv6 = BOOL false - +
links = BOOL true - +
one_file_system @@ -266,7 +266,7 @@ Below is a table of options for the ```rsync``` parameter. Please have a look at
password_file = FILENAME - + (Lsyncd >= 2.1.2)
rsh = COMMAND - - + +
rsync_path = PATH - + (path to rsync on remote host)
suffix = SUFFIX - + (Lsyncd >= 2.2.0)
temp_dir = DIR - +
= BOOL true - +
update @@ -373,20 +373,13 @@ Below is a table of options for the ```rsync``` parameter. Please have a look at BOOL false -
_extra - = - TABLE of STRINGS. - - If absolutely needed, additional arguments can be specified as a TABLE of STRINGS(example: { "--omit-dir-times", "--omit-link-times" }). Note that the underscore highlights this as workaround. If you need something that is not covered by the above options, please request it via a feature request on the project website. Most notably, do not add -r for recursive or -a which implies recursive, since Lsyncd will handle that by itself. Additionally do not add -R for relative, which will ruin Lsyncd <-> Rsync communication.
default.rsyncssh ---------------- -This configuration differs from the standard rsync configuration in that it uses ssh commands to move files or directories locally at the target host instead of deleting and transferring again. This configuration does spawn Rsync processes like default.rsync but additionally will spawn ```/usr/bin/ssh HOST mv ORIGIN DESTINATION``` commands. +This configuration differs from the standard rsync configuration in that it uses ssh commands to move files or directories locally at the target host instead of deleting and transferring again. This configuration does spawn Rsync processes like default.rsync but additionally will spawn ```/usr/bin/ssh HOST mv ORIGIN DESTINATION``` commands. Different to default.rsync it does not take an uniform ```target``` parameter, but needs ```host``` and ```targetdir``` separated. @@ -441,7 +434,7 @@ sync { default.rsyncssh, source="/srcdir", host="remotehost", - excludeFrom="/etc/lsyncd.exclude", + filterFrom="/etc/lsyncd.filter", targetdir="/dstdir", rsync = { archive = true, @@ -515,13 +508,13 @@ Two additional parameters can be specified to sync{}: - -
excludeFrom +
filterFrom = FILENAME loads exclusion rules from this file, on rule per line
exclude +
filter = LIST loads exclusion rules from this list of strings diff --git a/manual3/invoking/index.md b/manual3/invoking/index.md index f99d894..72a96eb 100644 --- a/manual3/invoking/index.md +++ b/manual3/invoking/index.md @@ -2,7 +2,7 @@ layout: default3 title: Invoking --- -As most Unix tools, Lsyncd will print a synopsis of its command line options when called with --help. +As most Unix tools, Lsyncd will print a synopsis of its command line options when called with --help. {% highlight shell %} lsyncd --help @@ -17,13 +17,13 @@ Also like most Unix tools, ```--version``` or ```-version``` will let Lsyncd pri lsyncd -version {% endhighlight %} -Lsyncd 2.1 is configured through a config file. +Lsyncd 3 is configured through at least one config file. {% highlight shell %} lsyncd CONFIGFILE {% endhighlight %} -A disadvantage with Rsync synchronization is that normally directory and file moves result in a deletion of the move origin and a retransfer of the move destination of the wire. However, Lsyncd 2 can use ssh commands to move the directories and files locally on the target. To use this use ```-rsyncssh``` followed by the local source directory, the remote host and the target directory there. The REMOTEHOST can include a user like ```me@remotehost.com```. +A disadvantage with Rsync synchronization is that normally directory and file moves result in a deletion of the move origin and a retransfer of the move destination of the wire. However, Lsyncd 3 can use ssh commands to move the directories and files locally on the target. To use this use ```-rsyncssh``` followed by the local source directory, the remote host and the target directory there. The REMOTEHOST can include a user like ```me@remotehost.com```. There is a difference in behaviour when running with -nodaemon. Lsyncd will not change its working directory to ```/```, as it does when becoming a daemon. Thus relative targets like ```./target``` will work with ```-nodaemon``` but must be specified to absolute paths to work in daemon mode. The source directories will also be turned into absolute paths by Lsyncd. The reason targets are not resolved to absolute paths while sources are is because Lsyncd itself does not care about the format of the target specifier which can also be remote hosts, rsyncd modules, etc. It is opaquely handed to rsync. It cares about the observed directories though. @@ -39,10 +39,3 @@ This might easily become too much. A particularly useful category is "Exec" whic lsyncd -log Exec CONFIGFILE {% endhighlight %} -When the initial startup sync fails by default Lsyncd will terminate with an error message. It has been designed this way, so configuration failures are visibly reported to a possibly beginning user. However, in production a remote target might be done, but you want Lsyncd to start nevertheless and keep trying to sync to the remote target until it is up. - -{% highlight shell %} -lsyncd -insist -rsync /home/USER/src remotehost:dst -{% endhighlight %} - -In production mode it is recommended to have insist on. It can also be specified in the settings{} command in a config file.