---
name: "lsyncd.conf.xml"
section: "5"
platform: "linux"
package: "lsyncd"
version: "1.34-1"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/lsyncd.conf.xml"
---

# lsyncd.conf.xml(5)

xconfig file for lsyncd

## NAME

lsyncd.conf.xml - xconfig file for lsyncd

## DESCRIPTION

*lsyncd.conf.xml* is used to configure the **lsyncd** daemon.

Note that any command line options can overrule settings in the config file. A **lsyncd** configuration file has an XML grammar. That means tags have to be closed with a / and the such. Following explanations will be provided with an examples.

The config file must start with a **\<lsyncd\>** root node. A "version" parameter has to be present which specifies the lsyncd version of the config file format. Currently this is 1.

```
<lsyncd version="1">
```

### SETTINGS

Next is optionally a **\<settings\>** node. It controls lsyncd global settings. All settings are optional.

```
  <settings>
```

If a **\<debug/\>** node is present all debug messages will be logged. Default is a normal verbosity.

```
    <debug/>
```

If **\<delay/\>** specified by the "value" parameter is greater than zero, lsyncd waits this amount of seconds between an event and calling the binary. All events for a directory in this timeframe will be aggregated to one call. If delay is 0 changes will be handlet immediatly. Default is 5 seconds.

```
    <delay/>
```

If a **\<scarce\>** node is present only error messages will be logged. Default is a normal verbosity.

```
    <scarce/>
```

If a **\<stubborn\>** node is present lsyncd will continue even if the startup sync fails. Default is being not stubborn.

```
    <stubborn/>
```

If a **\<no-daemon\>** node is present lsyncd will not detach and log to stdout/stderr. Default is to detach as daemon.

```
    <no-daemon/>
```

If a **\<dry-run\>** node is present lsyncd will not call any actions (rsync) for test purposes. Default is not to run dry.

```
    <dry-run/>
```

With an **\<exclude-from\>** entry an exclusion file can be specified with a "filename" parameter. This will be passed to rsync and follows rsyncs grammar for exclude files. Default is not to pass an exlude file to rsync.

```
    <exclude-from filename="/etc/lsyncd.exclude"/>
```

With a **\<logfile\>** node to location of the logfile can be changed. Default is */var/log/lsyncd*. Take care that the user which lsyncd is running with can write to this file.

```
    <logfile filename="/var/log/lsyncd"/>
```

A **\<binary\>** node specifies the binary lsyncd will call to sync stuff. Usually you want this to be rsync. Default is */usr/bin/rsync*.

```
    <binary filename="/usr/bin/rsync"/>
```

If a **\<pidfile\>** node is present lsyncd will write its pid there. Default is not to write a pidfile.

```
    <pidfile filename="/var/run/lsyncd.pid"/>
```

With a **\<callopts\>** node you can control the arguments lsyncd will call the \<binary\> (rsync) with. Each child node will specify one argument. \<option\> specifies a literal argument. Only %r will be replaced with 'r' when rsycnd is supposed to work recursive (on startup of lsyncd) or 'd' on normal operations. \<exclude-file\> will be replaced with **--exclude-from \[FILE\]** if an \<exclude-from\> file is specified. \<source\> will be replaced the source directory to sync from. \<destination\> will be replace to the target to sync to. Default arguments are **-lt%r --delete {--exclude-from \[FILE\]} \[SOURCE\] \[DIRECTORY\]**.

```
    <callopts>
        <option text="-lt%r"/>
        <option text="--delete"/>
        <exclude-file/>
        <source/>
        <destination/>
    </callopts>
```

End of (optional) settings section.

```
  </settings>
```

### DIRECTORIES

With **\<directory\>** nodes arbitrarily many sources to be watched can be specified. Within a \<directory\> entry you can again specify a **\<binary\>**, **\<exclude-from\>** or a **\<callopt\>** node which will override global settings just for this source. See SETTINGS for details on this options.

The mandatory **\<source\>** node specifies with the parameter "path" the directory to watch and sync. (once in a while something is mandatory. Also at least one **\<target;\>** node has to specified where to sync to. This has to be a format accepted by rsync.

```
  <directory>
    <source path="/absolute/path/to/source"/>
    <target path="desthost::module/"/>
  </directory>
```

End of a *lsyncd.conf.xml* file.

```
</lsyncd>
```

## FILES

*/etc/lsyncd.conf.xml*

The default location of the configuration file.

## SEE ALSO

[**lsyncd**(1)](/lsyncd/1.md)

## AUTHOR

**Axel Kittenberger** \<axel.kittenberger@univie.ac.at\>

-

  Author.

## COPYRIGHT

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation.\
