lsyncd1
A daemon to continuously synchronize directory trees
Usage
config file
default rsync
behaviour
default rync+ssh
behaviour
(moves
and
deletes
through
ssh)
default direct
behaviour
(local
file
operations/rsync)
Overview
Lsyncd(1) watches local directory trees through an event monitor interface (inotify, fsevents). It aggregates and combines events for a few seconds and then spawns one or more processes to synchronize the changes. By default this is rsync(1). Lsyncd is thus a light-weight asynchronous live mirror solution that is comparatively easy to install not requiring new filesystems or block devices and does not hamper local filesystem performance.
Rsync+ssh is an advanced action configuration that uses a SSH(1) to act file and directory moves directly on the target instead of re-transmitting the move destination over the wire.
Fine-grained customization can be achieved through the CONFIG-FILE. Custom action configs can even be written from scratch in cascading layers ranging from shell scripts to code written in the LUA(1) language. This way simplicity can be balanced with powerfulness. See the online manual for details on the CONFIG-FILE https://axkibe.github.io/lsyncd/manual/config/file/ .
Note that under normal configuration Lsyncd will delete pre-existing files in the target directories that are not present in the respective source directory.
Options
-
-delay SECS -
Overrides the default delay times.
-
-help -
Show a help message.
-
-insist -
Continues start up even if rsync cannot connect.
-
-log LEVEL -
Controls which kind of events are logged. By default Lsyncd logs Normal and Error Messages. -log scarce will make Lsyncd log Error messages only. -log all will log all debug messages.
-
-log Category -
Turns on a specific debug message. E.g. -log Exec will log all processes as they are spawned.
-
-nodaemon -
Lsyncd will not detach from the invoker and log as well to stdout/err.
-
-pidfile FILE -
Lsyncd will write its process ID in FILE.
-
-runner FILE -
Makes the Lsyncd core load the part of Lsyncd written in Lua from FILE.
-
-version -
Writes version information and exits.
Exit status
(128+SIGNUM)
Terminated by Signal (143 by TERM)
-1
Failure (syntax, unrecoverable error condition, internal failure)
Version
This man page is for lsyncd(1) version 2.2.0
Copying
Copyright (C) 2010-2017 Axel Kittenberger. Free use of this software is granted under the terms of the GNU General Public License (GPL) version 2, or any later version. Free redistrubition of this Documentation (/doc directory) is granted under the terms of the Creative Commons 3.0 Attribution License (CC-3.0-BY).
Releases
8 releases since Debian 6.0 (Squeeze); the text changed 4 times.
-delay since Debian 7 (Wheezy);
-help since Debian 7 (Wheezy);
-insist since Debian 7 (Wheezy);
-log since Debian 7 (Wheezy);
-nodaemon since Debian 7 (Wheezy);
-pidfile since Debian 7 (Wheezy);
-runner since Debian 7 (Wheezy);
-version since Debian 7 (Wheezy).
--binary until Debian 6.0 (Squeeze);
--conf until Debian 6.0 (Squeeze);
--debug until Debian 6.0 (Squeeze);
--deleay until Debian 6.0 (Squeeze);
--dryrun until Debian 6.0 (Squeeze);
--exclude-file until Debian 6.0 (Squeeze);
--help until Debian 6.0 (Squeeze);
--logfile until Debian 6.0 (Squeeze);
--no-daemon until Debian 6.0 (Squeeze);
--pidfile until Debian 6.0 (Squeeze);
--scarce until Debian 6.0 (Squeeze);
--stubborn until Debian 6.0 (Squeeze);
--version until Debian 6.0 (Squeeze).