Giter Site home page Giter Site logo

lsyncd / lsyncd Goto Github PK

View Code? Open in Web Editor NEW
5.6K 188.0 471.0 2.17 MB

Lsyncd (Live Syncing Daemon) synchronizes local directories with remote targets

License: GNU General Public License v2.0

Lua 65.95% C 27.87% CMake 3.23% M4 0.15% Shell 0.44% Nix 2.37%

lsyncd's Introduction

Lsyncd -- Live Syncing (Mirror) Daemon

Description

Lsyncd watches a local directory trees event monitor interface (inotify or fsevents). It aggregates and combines events for a few seconds and then spawns one (or more) process(es) to synchronize the changes. By default this is rsync. Lsyncd is thus a light-weight 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 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 language. This way simple, powerful and flexible configurations can be achieved. See the manual for details.

Lsyncd 2.2.1 requires rsync >= 3.1 on all source and target machines.

License: GPLv2 or any later GPL version.

When to use

Lsyncd is designed to synchronize a local directory tree with low profile of expected changes to a remote mirror. Lsyncd is especially useful to sync data from a secure area to a not-so-secure area.

2-way/bidirection synchronization

It is not possible to use lsyncd to synchronize for example folder1 with folder2 and vice versa. Only one source to one target. Two way synchronization is a very hard problem that needs specialized tools. Imagine you start writing a very large file to folder1, lsyncd will start synchronizing this file to folder2, which might be on a different machine. The lsyncd on that machine will see a new file, and try to synchronize it back to folder1. If at the same time, you change bytes in this file, those changes will be overwritten with old data. Using lsyncd in such a way might work in practice, but data corruption is easily possible if you write into files afterwards. git-annex is a good way to do this, if you don't mind working with git repositories. It stores each change as a revision that can be rolled back.

Other synchronization tools

DRBD operates on block device level. This makes it useful for synchronizing systems that are under heavy load. Lsyncd on the other hand does not require you to change block devices and/or mount points, allows you to change uid/gid of the transferred files, separates the receiver through the one-way nature of rsync. DRBD is likely the better option if you are syncing databases.

GlusterFS and BindFS use a FUSE-Filesystem to interject kernel/userspace filesystem events.

Mirror is an asynchronous synchronisation tool that takes use of the inotify notifications much like Lsyncd. The main differences are: it is developed specifically for master-master use, thus running on a daemon on both systems, uses its own transportation layer instead of rsync and is Java instead of Lsyncd's C core with Lua scripting.

git-annex allows managing large files with git, without storing the file contents in git. It can sync, backup, and archive your data, offline and online. Checksums and encryption keep your data safe and secure. Bring the power and distributed nature of git to bear on your large files with git-annex.

git-annex is designed for git users who love the command line. For everyone else, the git-annex assistant turns git-annex into an easy to use folder synchroniser.

Wikipedia Comparison of file synchronization software

Lsyncd usage examples

lsyncd -rsync /home remotehost.org::share/

This watches and rsyncs the local directory /home with all sub-directories and transfers them to 'remotehost' using the rsync-share 'share'.

lsyncd -rsyncssh /home remotehost.org backup-home/

This will also rsync/watch '/home', but it uses a ssh connection to make moves local on the remotehost instead of re-transmitting the moved file over the wire.

Some more complicated examples, tips and tricks you can find in the manual.

Disclaimer

Besides the usual disclaimer in the license, we want to specifically emphasize that the authors, and any organizations the authors are associated with, can not be held responsible for data-loss caused by possible malfunctions of Lsyncd.

lsyncd's People

Contributors

ajdavis avatar andrewfenn avatar axkibe avatar bs-github avatar coolcold avatar creshal avatar dancerj avatar danielkza avatar devurandom avatar dreiss avatar exkazuu avatar fabled avatar grooverdan avatar gsouf avatar j1cken avatar jandsu avatar kashyapp avatar kenyon avatar mattwells avatar msabramo avatar perusio avatar plouj-oracle avatar poelzi avatar rhunter avatar rolandwalker avatar rotu avatar schneiderl avatar st63jun avatar taylor-s-dean avatar wodny avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lsyncd's Issues

lsyncd fails on rsync versions not supporting -d option

Originally filed by [email protected] on 2009-11-05T09:58:29

What steps will reproduce the problem?
Try to sync with a rsync version that doesn't support -d option (eg. < 2.6.4).

What is the expected output? What do you see instead?
During normal operations, directories should sync, but the following output
is generated:

rsync: on remote machine: -ldtp: unknown option
rsync error: syntax or usage error (code 1) at main.c(1002)
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(600)
[sender=3.0.6]

What version of the product are you using? On what operating system?
lsyncd 1.26
rsync 3.0.6 on source machine
rsync 2.6.2 on remote machine

Please provide any additional information below.
Initial sync works as expected (lsyncd uses -r during startup). I'm tempted
to always add -r option in lsyncd configuration file, but I'm not sure if
it can cause bad side effects. After all lsyncd uses -d for a reason, isn't it?

on node halt, lsyncd will exit.

Originally filed by [email protected] on 2010-06-09T09:19:48

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

rsync: failed to connect to 10.9.10.164: Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(122) [sender=3.0.7]
Wed Jun 9 17:12:23 2010: Forked binary process returned non-zero return code: 10

What version of the product are you using? On what operating system?
lsyncd : 1.33
sync : 3.07
linux : gentoo 2.6.26-gentoo-r3 64bit

Please provide any additional information below.

5 nodes sync with lsyncd. where on node down,rsyncd will reutrn 10,and lsyncd auto exit.

here's my configure file:

Maximum file list? (no space left on device)

Originally filed by [email protected] on 2010-07-05T00:57:09

First tests with lsyncd on a medium-size directory (about 2G). I get:

ERROR: Cannot add watch /home/... (28:No space left on device)

Both source and target disk have plenty of space. Maybe it's problem with the number of directory to watch?

compilation warnings and lbash copy errors

Originally filed by [email protected] on 2010-11-26T10:46:53

What steps will reproduce the problem?
1.source compilation generate warnings
(inotify.c:75: warning /inotify.c:91: warning)

make

make all-am
make[1]: Entering directory `/usr/src/svn'
if gcc -DHAVE_CONFIG_H -I. -I. -I. -Wall -I/usr/local/include -MT lsyncd.o -MD -MP -MF ".deps/lsyncd.Tpo" -c -o lsyncd.o lsync d.c;
then mv -f ".deps/lsyncd.Tpo" ".deps/lsyncd.Po"; else rm -f ".deps/lsyncd.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I. -Wall -I/usr/local/include -MT inotify.o -MD -MP -MF ".deps/inotify.Tpo" -c -o inotify.o in otify.c;
then mv -f ".deps/inotify.Tpo" ".deps/inotify.Po"; else rm -f ".deps/inotify.Tpo"; exit 1; fi
inotify.c: In function ‘l_addwatch’:
inotify.c:75: warning: format ‘%d’ expects type ‘int’, but argument 6 has type ‘lua_Integer’
inotify.c: In function ‘l_rmwatch’:
inotify.c:91: warning: format ‘%d’ expects type ‘int’, but argument 5 has type ‘lua_Integer’
luac lsyncd.lua

2.using lbash.lua with nodaemon=false

3.creating mkdir -p /src/a/b/c/d/e/f

on the target :

tree -L 10 /trg/

/trg/
-- a -- b
|-- b
| -- c |-- d
| -- e |-- f
-- c |-- c |-- d
| -- e |-- f
-- d |-- d |-- e
| -- f -- e
|-- e
| -- f -- f
`-- f

duplicated directories on target ...


lsyncd 2 - r426 - linux redhat 5.3 64

tail -f "/tmp/lsyncd.log"
Fri Nov 26 10:59:47 2010 Normal: Event Blanket spawns shell 'if [ "$(ls -A /src/)" ]; then cp -r /src/* /trg/; fi'
Fri Nov 26 10:59:47 2010 Normal: Startup of '/src/' finished.
Fri Nov 26 11:01:35 2010 Normal: Event Create spawns shell 'cp -r /src//a /trg//a'
Fri Nov 26 11:01:35 2010 Normal: Finished Create on /src//a/ = 0
Fri Nov 26 11:01:35 2010 Normal: Event Create spawns shell 'cp -r /src//a/b /trg//a/b'
Fri Nov 26 11:01:35 2010 Normal: Finished Create on /src//a/b/ = 0
Fri Nov 26 11:01:35 2010 Normal: Event Create spawns shell 'cp -r /src//a/b/c /trg//a/b/c'
Fri Nov 26 11:01:35 2010 Normal: Finished Create on /src//a/b/c/ = 0
Fri Nov 26 11:01:35 2010 Normal: Event Create spawns shell 'cp -r /src//a/b/c/d /trg//a/b/c/d'
Fri Nov 26 11:01:35 2010 Normal: Finished Create on /src//a/b/c/d/ = 0
Fri Nov 26 11:01:35 2010 Normal: Event Create spawns shell 'cp -r /src//a/b/c/d/e /trg//a/b/c/d/e'
Fri Nov 26 11:01:35 2010 Normal: Finished Create on /src//a/b/c/d/e/ = 0
Fri Nov 26 11:01:35 2010 Normal: Event Create spawns shell 'cp -r /src//a/b/c/d/e/f /trg//a/b/c/d/e/f'
Fri Nov 26 11:01:35 2010 Normal: Finished Create on /src//a/b/c/d/e/f/ = 0


tail -f /tmp/lsyncd.stat

Lsyncd status report at Fri Nov 26 10:59:47 2010

Sync1 source=/src/
There are 0 delays
Excluding:
nothing.

Watching 1 directories
1: /src/
2: /src/a/
3: /src/a/b/
4: /src/a/b/c/
5: /src/a/b/c/d/
6: /src/a/b/c/d/e/
7: /src/a/b/c/d/e/f/

sincerely yours ...

Syncing one source to multple targets in lsyncd 2.0

Originally filed by [email protected] on 2010-12-14T18:45:11

What steps will reproduce the problem?

  1. sudo lsyncd [options] [source] [target] [target]

What is the expected output? What do you see instead?
In previous versions I believe you were able to sync one source to multiple targets. When I supply the syntax for multiple targets I get an error that says I'm only allowed one config file. So Lsyncd is reading one of my targets as the location of the config file.

What version of the product are you using? On what operating system?
lsyncd 2.0 Ubuntu 10.0.4 Server

Please provide any additional information below.
Is syncing one source to multiple targets even possible with 2.0? If it is how would I accomplish that without getting the error? Is this a bug? Thanks for your help. Love your work by the way!

The lsyncd.conf.xml.5 man page gets installed in man1

Originally filed by [email protected] on 2009-06-18T13:01:50

Because it's right next to the lsyncd.1 page, to be installed as man1 in
Maikefile.am, the lsyncd.conf.xml.5 gets installed in the wrong place, as
it should go to man5.

The fix is trivial :

-nodist_man1_MANS = doc/lsyncd.1 doc/lsyncd.conf.xml.5
+nodist_man1_MANS = doc/lsyncd.1
+nodist_man5_MANS = doc/lsyncd.conf.xml.5

libxml2-dev dependency not checked by configure script

Originally filed by [email protected] on 2009-07-31T12:15:23

What steps will reproduce the problem?

  1. ./configure
  2. make

What is the expected output? What do you see instead?
make all-am
make[1]: Entering directory /root/lsyncd-1.26' gcc -DHAVE_CONFIG_H -DXML_CONFIG -I. -Wallxml2-config --cflags` -g -O2
-MT lsyncd.o -MD -MP -MF .deps/lsyncd.Tpo -c -o lsyncd.o lsyncd.c
/bin/sh: xml2-config: command not found
lsyncd.c:36:27: error: libxml/parser.h: No such file or directory
lsyncd.c:37:25: error: libxml/tree.h: No such file or directory
...

What version of the product are you using? On what operating system?
1.26, Debian Linux (Lenny)

Please provide any additional information below.
Configure should check for libxml2-dev.

Nice work btw! :)

Exclude doesn't work with rsyncssh

Originally filed by [email protected] on 2011-01-17T20:30:05

Hi,

Here is my lsyncd.conf :

settings = {
logfile = "/home/toto/log/lsyncd.log",
statusFile = "/home/toto/log/lsyncd.status",
}

sync{
default.rsyncssh,
source = "/home/src/example",
host = "192.168.1.100",
targetdir = "/home/dest/example",
exclude = {"//home/src/example/tmp/**"}
}

Launched with :

lsyncd -nodaemon -log all etc/lsyncd.conf

I get :

Exclude: toLuaPattern '//home/src/example/tmp/*' = '^/home/src/example/tmp/."

So the pattern looks ok (although I'd suggest let people use real Lua regex patterns, it will make easier for everybody, and allow more possibilities. The translation from your pseudo patterns to Lua patterns is unnecessary in my opinion).

21:13:23 Function: Inotify.addWatch(/home/src/example/tmp/, (true), (nil), (nil))
21:13:23 Inotify: not concerning '/home/src/example/tmp/'

So pattern seems to work. But it is not used in the rsync command :

21:13:23 Exec: /usr/bin/rsync [--delete] [-r] [-lts] [/home/src/example/] [192.168.1.100:/home/dest/example/]

And I get many :

rsync: send_files failed to open "/home/src/example/tmp/sessions/sess_1234": Permission denied (13)

Although I told the conf to ignore this directory.

Am I doing something wrong or is this a bug ?
Do i have to add something specific for the rsync command ? The -exclude-from doesn't seem to exist anymore.

Thanks in advance :)

Know when parent directory rsync will be completed

Originally filed by [email protected] on 2010-07-20T22:05:37

Maybe I am mistaken on the use of %r in configuration but lsyncd seems extremely inefficient when there are too many directories involved (such as svn).

For example, if I have a directory structure similar to this:

var
-- www |-- images |-- pic.jpg
|-- css
`-- main.css

If I modify pic.jpg then within the delay time I modify main.css is it possible to make lsyncd just rsync on /var/www instead of once for /var/www/images and /var/www/css?

compilation error of lsyncd2.beta1

Originally filed by [email protected] on 2010-11-17T12:36:32

OS : Redhat 5.3 x86_64
svn source lsyncd2 : r369

lua packages :
liblua.x86_64 5.1.4-3.el5.pp installed
liblua-devel.x86_64 5.1.4-3.el5.pp installed
lua.x86_64 5.1.4-4.el5 installed
lua-devel.x86_64 5.1.4-4.el5 installed
lua-static.x86_64 5.1.4-4.el5 installed

coming from rpmbone

lua -v
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
luac -v
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio

1st :
./autogen.sh OK
./configure KO
checking for LIBLUA... configure: error: Package requirements (lua5.1) were not met:

No package 'lua5.1' found

solved by :
ln -s /usr/lib64/pkgconfig/lua.pc /usr/lib64/pkgconfig/lua5.1.pc
./configure ---> OK

2nd
make KO :

[... svn]# make
make all-am
make[1]: Entering directory /usr/src/svn' objcopy --input-target=binary --output-target=gcc -dumpmachine--binary-architecture=cat architectureluac.out luac.o objcopy: luac.o: Invalid bfd target make[1]: *** [luac.o] Error 1 make[1]: Leaving directory/usr/src/svn'
make: *** [all] Error 2
[... svn]#

with

gcc -dumpmachine

x86_64-redhat-linux

objcopy --info

BFD header file version 2.17.50.0.6-9.el5 20061020
elf64-x86-64
(header little endian, data little endian)
i386
elf32-i386
(header little endian, data little endian)
i386
a.out-i386-linux
(header little endian, data little endian)
i386
efi-app-ia32
(header little endian, data little endian)
i386
elf64-little
(header little endian, data little endian)
i386
elf64-big
(header big endian, data big endian)
i386
elf32-little
(header little endian, data little endian)
i386
elf32-big
(header big endian, data big endian)
i386
srec
(header endianness unknown, data endianness unknown)
i386
symbolsrec
(header endianness unknown, data endianness unknown)
i386
tekhex
(header endianness unknown, data endianness unknown)
i386
binary
(header endianness unknown, data endianness unknown)
i386
ihex
(header endianness unknown, data endianness unknown)
i386

           elf64-x86-64 elf32-i386 a.out-i386-linux efi-app-ia32
      i386 elf64-x86-64 elf32-i386 a.out-i386-linux efi-app-ia32

           elf64-little elf64-big elf32-little elf32-big srec symbolsrec
      i386 elf64-little elf64-big elf32-little elf32-big srec symbolsrec

           tekhex binary ihex
      i386 tekhex binary ihex

[...svn]#

any help will be apreciated

[email protected]

Neither Logfile nor Pidfile is made.

Originally filed by [email protected] on 2011-01-21T11:29:39

The log is not correctly vomited in "Logfile" and "Pidfile" though it describes in the "lsyncd.conf" file as stated above.
"Nodaemon = true" mode starts correctly.

The command specified when lsyncd is started is

lsyncd /etc/lsyncd.conf


setting = {
logfile = "/var/tmp/lsyncd.log",
statusFile = "/var/tmp/lsyncd.status",
nodaemon = true,

}

By the way,
lsyncd /etc/lsyncd.conf -logfile /var/tmp/lsyncd.log -pidfile /var/tmp/lsyncd.status

When the command is specified like this, the log file is correctly written.
Should I specify the command though it describes in "lsyncd.conf"?

The version used is "lsyncd-2.0.2".

Best regards, Tachi.

Segfault on ubuntu 10.04 x64 with latest 1.33 (ok with 1.26)

Originally filed by quazardous on 2010-07-07T06:52:23

What steps will reproduce the problem?

  1. download 1.33
  2. compile 1.33
  3. execute in no-daemon

What is the expected output? What do you see instead?
segmentation fault

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

Please provide any additional information below.

Can't get rid of "Queue is broken, delay not a dpos" error message

Originally filed by [email protected] on 2011-02-08T00:05:54

What steps will reproduce the problem?

I use a lua config file that will spawn programs (that will run for severals seconds) and then copy intermediate files to a remote server using sftp.

What is the expected output? What do you see instead?

Everything works correctly but at the end lsyncd crashes saying :
.....
00:55:24 Call: getAlarm()
00:55:24 Debug: getAlarm returns: (false)
00:55:24 Masterloop: going into select (no timeout).
00:55:24 Call: collectProcess()
00:55:24 Delay: collected an event
00:55:24 Delay: Finish of Create on /home/xxxx
00:55:24 Call: cycle()
00:55:24 Function: invokeActions('Sync1',(Timestamp: 42966265.74))
00:55:24 Call: getAlarm()
00:55:24 Debug: getAlarm returns: (false)
00:55:24 Masterloop: going into select (no timeout).
00:55:24 Call: collectProcess()
00:55:24 Delay: collected an event
00:55:24 Error: IN LUA: lsyncd.lua:1150: Queue is broken, delay not a dpos
00:55:24 Error: Backtrace 1 :[C]:-1
00:55:24 Error: Backtrace 2 :lsyncd.lua:1150
00:55:24 Error: Backtrace 3 :lsyncd.lua:1207
00:55:24 Error: Backtrace 4 :lsyncd.lua:2500

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

lsyncd 2.0.2 on ubuntu 64 bits 10.04

Please provide any additional information below.

I write my conf file using the image magic example. No clue at the moment.
I do not understand the error, what does mean the error message ? Lsyncd tries to unstack a delay event that does not exist ?
Thank you in advance for looking into this issue

ERROR: Cannot add watch ..... (28:No space left on device)

Originally filed by [email protected] on 2010-10-15T11:28:38

What steps will reproduce the problem?

  1. large homedir ( million files )
  2. lsyncd --exclude-from=/home/oernii/.rsync_exclude --no-daemon --verbose /home/oernii/ remote::/BACKUP/

What is the expected output? What do you see instead?
sync should run without errors

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

Please provide any additional information below.
After running I am getting a LOT of this:

watching /home/oernii/.kde
ERROR: Cannot add watch /home/oernii/.kde (28:No space left on device)

Excluding-Problems

Originally filed by [email protected] on 2009-08-26T17:24:03

Hi,

I just can't make the "exclude-from"-option work.

I created a file /etc/ha-lsyncd.exclude containing all directories I want
to leave unsynchronized.

I tried
(a) <absolut path of directory i don't want to be mirrored>
(b)
(c) RSYNC syntax: "- "

but when I start lsyncd with

lsyncd --exclude-from /etc/ha-lsyncd.exclude

the excluded directories are still in sync. What is the correct syntax for
that file?

it is bug?

Originally filed by [email protected] on 2010-04-07T08:57:20

            } else if (!xmlStrcmp(dnode->name, BAD_CAST "binary")) {
                    xc = xmlGetProp(dnode, BAD_CAST "filename");
                    if (xc == NULL) {
                            fprintf(stderr, "error in config file: 

attribute filename missing from \n");
exit(LSYNCD_BADCONFIGFILE);
}
dc->exclude_file = s_strdup((char *) xc);

bug??

15:27:43 Error: IN LUA: lsyncd.lua:3393: event does not have field 'isList'

Originally filed by [email protected] on 2011-02-24T14:32:52

What steps will reproduce the problem?
1.

mkdir /tmp/1 /tmp/2

[alex@alex-c5-64 2]$ cat /etc/lsyncd.conf

sync { default.rsync,
name="alex-c5",
source="/tmp/2",
target="/tmp/1",
rsyncOps={"-a", "--numeric-ids", "--bwlimit=10000", "--delay-updates", "--partial-dir=.rsync.tmp" },
exclude=".rsync.tmp",
init=false
}

gzip_text_pdf = {
onCreate = "sleep 5; test -f ^sourcePathname && echo ^sourcePathname | grep -q txt$ && gzip -f ^sourcePathname",
}
sync { gzip_text_pdf,
name="alex-c5-gzip",
source="/tmp/2",
}
[alex@alex-c5-64 2]$ lsyncd -nodaemon -log all /etc/lsyncd.conf

  1. in another terminal:

cd /tmp/2
for i in aa bb cc dd; do echo $i > $i.txt; sleep 15 ; done

What is the expected output? What do you see instead?

files in /tmp/2 should be gzipped and synced to /tmp/1 , instead I see

15:27:38 Inotify: got event Create bb.txt(1)
15:27:38 Function: delay(alex-c5, Create, /bb.txt, (nil))
15:27:38 Exclude: '/bb.txt' NOT matches '/.rsync.tmp'
15:27:38 Delay: New Create:/bb.txt
15:27:38 Function: delay(alex-c5-gzip, Create, /bb.txt, (nil))
15:27:38 Delay: New Create:/bb.txt
15:27:38 Call: inotifyEvent()
15:27:38 Inotify: got event Modify bb.txt(1)
15:27:38 Function: delay(alex-c5, Modify, /bb.txt, (nil))
15:27:38 Exclude: '/bb.txt' NOT matches '/.rsync.tmp'
15:27:38 Delay: Modify:/bb.txt absorbed by Create:/bb.txt
15:27:38 Function: delay(alex-c5-gzip, Modify, /bb.txt, (nil))
15:27:38 Delay: Modify:/bb.txt absorbed by Create:/bb.txt
15:27:38 Call: cycle()
15:27:38 Function: invokeActions('alex-c5',(Timestamp: 316531.19))
15:27:38 Function: invokeActions('alex-c5-gzip',(Timestamp: 316531.19))
15:27:38 Normal: Event Create spawns shell 'sleep 5; test -f /tmp/2//bb.txt && echo /tmp/2//bb.txt | grep -q txt$ && gzip -f /tmp/2//bb.txt'
15:27:38 Exec: /bin/sh [-c] [sleep 5; test -f "$1" && echo "$1" | grep -q txt$ && gzip -f "$1"] [/bin/sh] [/tmp/2//bb.txt]
15:27:38 Call: getAlarm()
15:27:38 Debug: getAlarm returns: (false)
15:27:38 Masterloop: going into select (no timeout).
rsync error: some files could not be transferred (code 23) at main.c(892) [sender=2.6.8]
15:27:38 Call: collectProcess()
15:27:38 Delay: collected a list
15:27:38 Normal: Finished a list = 23
15:27:38 Delay: Finished list = 23
15:27:38 Call: cycle()
15:27:38 Function: invokeActions('alex-c5',(Timestamp: 316531.21))
15:27:38 Function: invokeActions('alex-c5-gzip',(Timestamp: 316531.21))
15:27:38 Call: getAlarm()
15:27:38 Debug: getAlarm returns: (Timestamp: 316546.19)
15:27:38 Masterloop: going into select (timeout 14.98 seconds)
15:27:43 Call: inotifyEvent()
15:27:43 Inotify: got event Create bb.txt.gz(1)
15:27:43 Function: delay(alex-c5, Create, /bb.txt.gz, (nil))
15:27:43 Exclude: '/bb.txt.gz' NOT matches '/.rsync.tmp'
15:27:43 Delay: New Create:/bb.txt.gz
15:27:43 Function: delay(alex-c5-gzip, Create, /bb.txt.gz, (nil))
15:27:43 Delay: New Create:/bb.txt.gz
15:27:43 Call: inotifyEvent()
15:27:43 Inotify: got event Attrib bb.txt.gz(1)
15:27:43 Function: delay(alex-c5, Attrib, /bb.txt.gz, (nil))
15:27:43 Exclude: '/bb.txt.gz' NOT matches '/.rsync.tmp'
15:27:43 Delay: Attrib:/bb.txt.gz absorbed by Create:/bb.txt.gz
15:27:43 Function: delay(alex-c5-gzip, Attrib, /bb.txt.gz, (nil))
15:27:43 Delay: Attrib:/bb.txt.gz absorbed by Create:/bb.txt.gz
15:27:43 Call: inotifyEvent()
15:27:43 Inotify: got event Modify bb.txt.gz(1)
15:27:43 Function: delay(alex-c5, Modify, /bb.txt.gz, (nil))
15:27:43 Exclude: '/bb.txt.gz' NOT matches '/.rsync.tmp'
15:27:43 Delay: Modify:/bb.txt.gz absorbed by Create:/bb.txt.gz
15:27:43 Function: delay(alex-c5-gzip, Modify, /bb.txt.gz, (nil))
15:27:43 Delay: Modify:/bb.txt.gz absorbed by Create:/bb.txt.gz
15:27:43 Call: inotifyEvent()
15:27:43 Inotify: got event Attrib bb.txt.gz(1)
15:27:43 Function: delay(alex-c5, Attrib, /bb.txt.gz, (nil))
15:27:43 Exclude: '/bb.txt.gz' NOT matches '/.rsync.tmp'
15:27:43 Delay: Attrib:/bb.txt.gz absorbed by Create:/bb.txt.gz
15:27:43 Function: delay(alex-c5-gzip, Attrib, /bb.txt.gz, (nil))
15:27:43 Delay: Attrib:/bb.txt.gz absorbed by Create:/bb.txt.gz
15:27:43 Call: inotifyEvent()
15:27:43 Inotify: got event Delete bb.txt(1)
15:27:43 Function: delay(alex-c5, Delete, /bb.txt, (nil))
15:27:43 Exclude: '/bb.txt' NOT matches '/.rsync.tmp'
15:27:43 Delay: Delete:/bb.txt replaces Create:/bb.txt
15:27:43 Function: delay(alex-c5-gzip, Delete, /bb.txt, (nil))
15:27:43 Call: collectProcess()
15:27:43 Delay: collected an event
15:27:43 Error: IN LUA: lsyncd.lua:3393: event does not have field 'isList'
15:27:43 Error: Backtrace 1 :[C]:-1
15:27:43 Error: Backtrace 2 :lsyncd.lua:722
15:27:43 Error: Backtrace 3 :lsyncd.lua:3393
15:27:43 Error: Backtrace 4 :lsyncd.lua:1198
15:27:43 Error: Backtrace 5 :lsyncd.lua:2500

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

lsyncd 2.0.2 on centos5 x86_64

Please provide any additional information below.

Problem with brackets in filename

Originally filed by [email protected] on 2010-11-25T16:34:33

Tryin' to sync a directory with brackets in filename, there's an error managing the filename.

Thu Nov 25 16:32:19 2010: rsyncing /myhome/sync/ --> user@host:/space/sync/
Thu Nov 25 16:32:25 2010: rsyncing /myhome/sync/Music/ --> user@host:/space/sync/Music/
Thu Nov 25 16:35:29 2010: rsyncing /myhome/sync/Music/album (year)/ --> user@host:/space/sync/Music/album (year)/
bash: -c: line 0: syntax error near unexpected token (' bash: -c: line 0:rsync --server -ldte.Lsf --no-r --delete . /space/sync/Music/album (year)/'
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(601) [sender=3.0.7]
Thu Nov 25 16:35:35 2010: Forked binary process returned non-zero return code: 12
Thu Nov 25 16:35:35 2010: ERROR: Rsync from /myhome/sync/Music/album (year)/ to user@host:/space/sync/Music/album (year)/ failed

Debian package currently on the testing branch, Version: 1.34-1

Feature-Request

Originally filed by [email protected] on 2010-12-30T10:50:12

I'd like to see lsyncd supporting fanotify, since we have lots of files in many different directories and cannot use inotify.

How long do think would it take to implment fanotify into lsyncd? I'm well aware of the "move"-problem, but don't care.

Maybe we can speed things up a little bit by helping you to test or pay a reward?

Segfault with trunk (r98)

Originally filed by [email protected] on 2010-05-27T16:09:35

What steps will reproduce the problem?

lsyncd runs for a while. After that it segfaults

syncd[24766] general protection rip:3385e796f0 rsp:7fff75a73448 error:0
lsyncd[24873]: segfault at 00000000ffffffff rip 0000003385e796d0 rsp
00007fff963cd798 error 4
lsyncd[32550] general protection rip:3385e796f0 rsp:7fff96631c18 error:0
lsyncd[996]: segfault at 0000000000000001 rip 0000003385e796d0 rsp
00007fff63767be8 error 4
lsyncd[1018]: segfault at ffffffffffffffd0 rip 0000003385e796f0 rsp
00007fff60f89428 error 4
lsyncd[1177]: segfault at ffffffffffffffd0 rip 0000003385e796f0 rsp
00007fff946a1f98 error 4
lsyncd[1210]: segfault at ffffffffffffffd0 rip 0000003385e796f0 rsp
00007fffa0dfe6d8 error 4
lsyncd[1272]: segfault at ffffffffffffffd0 rip 0000003385e796f0 rsp
00007fffa4442bf8 error 4

What is the expected output? What do you see instead?

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

CentOS 5.4

Please provide any additional information below.

running rsync with --timeout 1. It also seems to segfault when a timeout occurs

io timeout after 1 seconds -- exiting
rsync error: timeout in data send/receive (code 30) at io.c(171) [sender=2.6.8]
rsync error: timeout in data send/receive (code 30) at io.c(171)
[receiver=2.6.8]
rsync: writefd_unbuffered failed to write 4092 bytes [sender]: Broken pipe (32)
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: timeout in data send/receive (code 30) at io.c(463) [sender=2.6.8]
rsync error: timeout in data send/receive (code 30) at io.c(171)
[receiver=2.6.8]
rsync: writefd_unbuffered failed to write 4092 bytes [sender]: Broken pipe (32)
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: timeout in data send/receive (code 30) at io.c(463) [sender=2.6.8]
rsync error: timeout in data send/receive (code 30) at io.c(171)
[receiver=2.6.8]
rsync: writefd_unbuffered failed to write 4092 bytes [sender]: Broken pipe (32)
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: timeout in data send/receive (code 30) at io.c(463) [sender=2.6.8]

btw --delay really makes my troubles less painful!

thank you!

minor spelling issues

Originally filed by [email protected] on 2011-02-25T18:36:59

The Debian developer tool Lintian found some minor spelling issues that are fixed by the attached patch.

Regards
Jan Dittberner

[PATCH] SUSE sysconfig/proxy config support

Originally filed by [email protected] on 2010-11-23T14:55:08

This patch allows to use sysconfig directly. This is used so that if you change the proxy using YaST, it will continue to work with the new configured proxy before the environment is regenerated.

This allows for libzypp to drop it proxy code and use libproxy exclusively.

You can see the module is only activated if running as root.

Duplicate calls of rsync if multiple files in directory change at the same time

Originally filed by [email protected] on 2009-09-22T15:10:17

What steps will reproduce the problem?

  1. run lsync on a directory
  2. copy a bunch of file to that directory (with 'cp')
  3. profit!

What is the expected output? What do you see instead?

I expect lsync to run rsync only once. Instead I see this:

Tue Sep 22 17:06:35 2009: rsyncing
/data/sites/jboek/productie/code/include/vogoo/img/ -->
user@HOSTB:/data/sites/jboek/productie/code/include/vogoo/img/
Tue Sep 22 17:06:36 2009: rsyncing
/data/sites/jboek/productie/code/include/vogoo/img/ -->
user@HOSTA:/data/sites/jboek/productie/code/include/vogoo/img/
Tue Sep 22 17:06:36 2009: event CLOSE_WRITE:c6.gif triggered.
Tue Sep 22 17:06:36 2009: rsyncing
/data/sites/jboek/productie/code/include/vogoo/img/ -->
user@HOSTB:/data/sites/jboek/productie/code/include/vogoo/img/
Tue Sep 22 17:06:36 2009: rsyncing
/data/sites/jboek/productie/code/include/vogoo/img/ -->
user@HOSTA:/data/sites/jboek/productie/code/include/vogoo/img/
Tue Sep 22 17:06:37 2009: event CLOSE_WRITE:c29.gif triggered.
Tue Sep 22 17:06:37 2009: rsyncing
/data/sites/jboek/productie/code/include/vogoo/img/ -->
user@HOSTB:/data/sites/jboek/productie/code/include/vogoo/img/
Tue Sep 22 17:06:37 2009: rsyncing
/data/sites/jboek/productie/code/include/vogoo/img/ -->
user@HOSTA:/data/sites/jboek/productie/code/include/vogoo/img/
Tue Sep 22 17:06:37 2009: event CLOSE_WRITE:c40.gif triggered.
Tue Sep 22 17:06:37 2009: rsyncing
/data/sites/jboek/productie/code/include/vogoo/img/ -->
user@HOSTB:/data/sites/jboek/productie/code/include/vogoo/img/
Tue Sep 22 17:06:38 2009: rsyncing
/data/sites/jboek/productie/code/include/vogoo/img/ -->
user@HOSTA:/data/sites/jboek/productie/code/include/vogoo/img/
Tue Sep 22 17:06:38 2009: event CLOSE_WRITE:index.htm triggered.
Tue Sep 22 17:06:38 2009: rsyncing
/data/sites/jboek/productie/code/include/vogoo/img/ -->
user@HOSTB:/data/sites/jboek/productie/code/include/vogoo/img/
Tue Sep 22 17:06:39 2009: rsyncing
/data/sites/jboek/productie/code/include/vogoo/img/ -->
user@HOSTA:/data/sites/jboek/productie/code/include/vogoo/img/
Tue Sep 22 17:06:39 2009: event CLOSE_WRITE:c30.gif triggered.

Repeating of rsync calls that are all the same.

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

1.26, Debian

Exclude list won't work correctly.

Originally filed by [email protected] on 2011-01-25T13:31:01

The file keeps being made after it starts and it being excluded in the place where daemon of lsyncd is started even if there is an update when describing it like this.

sync{
default.rsync,
source="/var/tmp/",
target="root@datanode1:/data2/mirror/",
rsyncOps="-avlt",
exclude = { "define.php" }
}


When daemon of lsyncd is started, it is made disregarding the exclusion list when the file is made after it starts or there is an update when describing it like this though it is excluded.

sync{
default.rsync,
source="/var/tmp/",
target="root@datanode1:/data2/mirror/",
rsyncOps="-avlt",
exclude = { "/define.php" }
}

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

Thanks.

lsyncd 2.0 crash

Originally filed by [email protected] on 2011-01-17T21:56:29

Imagine a setup of workstation A, lsyncd server B, and lsyncd target C.

What steps will reproduce the problem?

  1. On workstation A, rsync -avz some-dir B:/path/lsyncd/watches/
  2. rsync creates a bunch of hidden temporary files on B, which triggers inotify.
  3. Crazyness ensues, ending with:
    xargs: illegal option -- 0
    xargs: Usage: xargs: [-t] [-p] [-e[eofstr]] [-E eofstr] [-I replstr] [-i[replstr]] [-L #] [-l[#]] [-n # [-x]] [-s size] [cmd [args ...]]
    Mon Jan 17 15:43:44 2011 Error: Critical exitcode.
    xargs: illegal option -- 0
    xargs: Usage: xargs: [-t] [-p] [-e[eofstr]] [-E eofstr] [-I replstr] [-i[replstr]] [-L #] [-l[#]] [-n # [-x]] [-s size] [cmd [args ...]]

What is the expected output? What do you see instead?
Server should handle this gracefully.

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

feature-request - intelligent moving not only for ssh

Originally filed by [email protected] on 2011-02-07T14:13:50

In case the target directory is local or on a network share, it would be really useful to use all file moving magic without rsyncssh.

The first lua code that I ever read was in lsyncd.lua and I managed to create a config file that does the same thing that rsyncssh does without putting ssh in between.
I did this by duplicating all the default_rsyncssh code plus the exit code lists into the config file and hacked around a bit.

But probably there is a much much smarter way to do this...

Make inotify events configurable

Originally filed by [email protected] on 2010-04-10T10:37:57

Lsyncd does not allow the user to configure the triggering inotify events.
Instead lsyncd registers the following events ATTRIB, CLOSE_WRITE, CREATE,
DELETE, DELETE_SELF, MOVED_FROM, MOVED_TO, DONT_FOLLOW, ONLYDIR. In some
use cases this will result in unnecessary sync operations which is in
particular painful if the network bandwidth between source and destination
is an issue.

Given an remote application which puts files in the lsyncd source by
creating a temporary file (CREATE), copy the data (CLOSE_WRITE), moving the
temporary file to the final filename (MOVE_FROM, MOVE_TO). This application
behavior is common because the final move command is an atomic operations
which ensures that only completely transmitted files are available within
the data source. In this use case lsyncd will trigger 4 rsync operations
and the data file will be transmitted twice.

The attached patch introduces the new configuration node which
may be configured in the global section or on a
basis. If no node is configured then the previously described
default event list is used.

Sample configuration:

warning at compilation

Originally filed by quazardous on 2010-10-12T07:03:11

What steps will reproduce the problem?

  1. unzip
  2. ./configure
  3. make

What is the expected output? What do you see instead?

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

ubuntu 10.04 x64

Please provide any additional information below.


lsyncd.c: In function ‘reset_options’:
lsyncd.c:966: warning: comparison with string literal results in unspecified behavior
lsyncd.c:972: warning: comparison with string literal results in unspecified behavior
lsyncd.c: In function ‘one_main’:
lsyncd.c:3049: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘size_t’


lsyncd does not sync permissions and ownership

Originally filed by [email protected] on 2009-08-13T11:44:27

What steps will reproduce the problem?

[host A]$ touch 123
[host A]$ ll
-rw-r--r-- 1 root root 0 Aug 13 12:38 123

[host B]$ ll
-rw-r--r-- 1 root root 0 Aug 13 12:38 123

[host A]$ chown cf 123
[host A]$ ll
-rw-r--r-- 1 cf root 0 Aug 13 12:38 123

[host B]$ ll
-rw-r--r-- 1 root root 0 Aug 13 12:38 123

[host A]$ chmod +x 123
[host A]$ ll
-rwxr-xr-x 1 cf root 0 Aug 13 12:38 123

[host B]$ ll
-rw-r--r-- 1 root root 0 Aug 13 12:38 123

What is the expected output? What do you see instead?

I expected preserved permissions and ownerships.

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

cat /etc/redhat-release

CentOS release 5.3 (Final)

rsync --version

rsync version 2.6.8 protocol version 29

lsyncd --version

Version: 1.25

Is there any option to set the expected behavior?

wrong pid in pid-file

Originally filed by [email protected] on 2011-01-10T22:34:10

In the new release 2.0.0 the option --pidfile writes the wrong pid into the pid file:

As the function write_pidfile() is called before daemonize(), the pid of the first process is written, not the pid of the daemon. So start scripts which check that number do not work right.

lsyncd does not allow to exclude directories

Originally filed by [email protected] on 2009-08-26T15:27:18

What steps will reproduce the problem?

I just wanted to exclude a complete subdirectory as it is written in
"Lsyncd usage examples"

What is the expected output? What do you see instead?

lsyncd --no-daemon --exclude-from <remote

host>:
Wed Aug 26 17:10:26 2009: command line options: syncing ->
:

Wed Aug 26 17:10:26 2009: ERROR: Reading file '' (21:Is a directory)

This implies that lsyncs has a problem excluding a directory. Excluding
files does work.

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

cat /etc/redhat-release

CentOS release 5.3 (Final)

rsync --version

rsync version 2.6.8 protocol version 29

lsyncd --version

Version: 1.25

Very poor performance on syncing deletes

Originally filed by [email protected] on 2009-11-25T19:47:11

What steps will reproduce the problem?

  1. Recursively delete some files
  2. Watch the log as lsyncd tries to rsync files that are no longer there
  3. Takes forever - the more that was deleted, the longer it takes

What is the expected output? What do you see instead?

I would expect that lsyncd would at least do a stat on the file to see if
it existed before trying to rsync it. Obviously if it is not there, lsyncd
should discard the sync and move on to the next inotify event - eventually
the event containing the correct sync level will get hit and rsync can then
be triggered. This would be MUCH faster.

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

lsync 1.26 / rsync version 3.0.6 protocol version 30
2.6.18-164.6.1.el5 #1 SMP Tue Nov 3 16:12:36 EST 2009 x86_64 x86_64 x86_64
GNU/Linux

Please provide any additional information below.

File creation or updates work great - just deletes where the problem seems
to be limited.

rsync IO error (due to unreachable peer) erroneously treated as success/done

Originally filed by [email protected] on 2010-10-13T09:34:57

lsync 1.39 ignores error codes from rsync while syncing dirs, so if remote rsyncd is unreachable directory never gets synced.

Problem is very easy to reproduce

  • configure lsyncd to watch some dir, check updates are propagated OK
  • stop rsyncd on remote side
  • make changes to local dir, watch something like this in debug log
    select() timeout, doing delays.
    in queue: 1 expired / 0 delayed dirs
    delay expired: acting for /apps/samba/shares/deps/novgorod/out/.
    calling /usr/bin/rsync -ltd --delete --bwlimit=100 --timeout=60 --password-file=/home/transf-novgorod/.rsyncpass --exclude-from /home/transf-novgorod/lsyncd.exclusions /apps/samba/shares/deps/novgorod/out/ [email protected]::from-spb/
    /usr/bin/rsync /apps/samba/shares/deps/novgorod/out/ --> [email protected]::from-spb/ [7756]
    rsync: failed to connect to hawk-n1.n1.maxidom.ru: Connection refused (111)
    rsync error: error in socket IO (code 10) at clientserver.c(98)
    Forked binary process returned non-zero return code: 10
    Finished waiting for all children
    in queue: 0 expired / 0 delayed dirs
    gone blocking
  • so changes are lost

This severely limits reliablity of lsyncd as mirroring solution.

Add sub directory pattern exclusion

Originally filed by quazardous on 2010-06-07T11:00:17

i work with eclipse+svn and i use lsyncd to mirror my project to the
working dev directory server.

lsyncd add all subdirectories so with .svn tree I have nearly 10000
directories being watched and i of course exploded my max_user_watches limit.

ok i defined it to 32000 and it s ok now but it would be very convenient
and more performant if .svn subdirs were not watched at all ;p

does FreeBSD can install lsyncd ?

Originally filed by [email protected] on 2010-09-05T07:31:16

I try to install with lsyncd in FreeBSD 8, but faild.
I had installed: xinetd build libxml2.
any ideas?

the configure had ok, and make info is:

make

make all-am
if gcc -DHAVE_CONFIG_H -DXML_CONFIG -I. -I. -I. -Wall xml2-config --cflags -g -O2 -MT lsyncd.o -MD -MP -MF ".deps/lsyncd.Tpo" -c -o lsyncd.o test -f 'lsyncd.c' || echo './'lsyncd.c; then mv -f ".deps/lsyncd.Tpo" ".deps/lsyncd.Po"; else rm -f ".deps/lsyncd.Tpo"; exit 1; fi
In file included from lsyncd.c:20:
inotify-nosys.h:15:24: error: asm/unistd.h: No such file or directory
In file included from lsyncd.c:20:
inotify-nosys.h:28: error: expected ':', ',', ';', '}' or 'attribute' before '__flexarr'
inotify-nosys.h:155:3: error: #error "Unsupported architecture!"
inotify-nosys.h:158:3: error: #error "Unsupported architecture!"
inotify-nosys.h:161:3: error: #error "Unsupported architecture!"
inotify-nosys.h: In function 'inotify_init':
inotify-nosys.h:167: error: '__NR_inotify_init' undeclared (first use in this function)
inotify-nosys.h:167: error: (Each undeclared identifier is reported only once
inotify-nosys.h:167: error: for each function it appears in.)
inotify-nosys.h: In function 'inotify_add_watch':
inotify-nosys.h:172: error: '__NR_inotify_add_watch' undeclared (first use in this function)
inotify-nosys.h: In function 'inotify_rm_watch':
inotify-nosys.h:177: error: '__NR_inotify_rm_watch' undeclared (first use in this function)
lsyncd.c: At top level:
……

lsyncd is not compatible with use of rsync option --relative

Originally filed by [email protected] on 2011-02-01T15:50:40

What steps will reproduce the problem?

  1. Add '--relative' option to rsyncOps
  2. Run lsyncd command as usual

What is the expected output? What do you see instead?
With a source of /home/me/tmp and destination of /backup/me, lsyncd should create and sync with /backup/me/home/me/tmp. It does the initial rsync to this directory, but it syncs /home/me/tmp with /backup/me. For example, creating 'test' in /home/me/tmp should create /backup/me/home/me/tmp/test but instead it creates /backup/me/test.

What version of the product are you using? On what operating system?
2.0.2 on Ubuntu 10.10

Please provide any additional information below.
The issue appears to be with how the paths are tracked by lsyncd because the rsyncOps are definitely still used for the incremental updates.

Please support Kqueue

Originally filed by [email protected] on 2010-10-30T15:36:00

What steps will reproduce the problem?

  1. Try to run on FreeBSD
  2. Of course it cannot
  3. ???
  4. ... No profit :(

What is the expected output? What do you see instead?

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

Please provide any additional information below.

If you guys could please support kqueue we could really, really use this at my job. It would be a much, much better solution than our cron'd rsyncs.

Thanks and keep up the good work!

sync recursive issue

Originally filed by swingcoder on 2011-02-23T03:23:44

What steps will reproduce the problem?
1.server A sync files to Server B
2.server B also sync the same files to Server A
3.there is a recursive loop
4.when sync small file it works fine,but big file , will no
5.in the syncing process there will generate a lot of temp file,named .filename.XX31z
..filename.Xua1
...filename.A6a51
or so
6.dose v2.0 solved this problem?

What is the expected output? What do you see instead?

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

lsyncd 1.0

Another binary/script with parameters

Originally filed by [email protected] on 2010-08-16T09:35:55

Hi,
I don't know, if my question is right here (sorry for bad english ;) )

I have Archlinux and install lsyncd-1.37.

I plan to bild a backup like windows shadowcopy.
I find incron, but incron can't watch recusive.

In find --binary in the lsyncd manpage. Start lsyncd only the binary, or can I give the binary parameters (varied filename /path) ?

If I can use parameters, then I wirte a bash script and use cp to copy the file like that:

time=$(date '+%H_%M')
cp -r "$1" "/path/to/the/backups/$(date '+%Y')/$(date '+%m')/$(date '+%d')/$time"

$1 is the parameter of the file, witch is, varied.

Thanks
GerhardSchr

PS.: If I must write these question somewhere else, please tell me this :)

v1.33,when setting <no-daemon/> will cause Segmentation fault

Originally filed by [email protected] on 2010-06-09T08:58:45

What steps will reproduce the problem?

  1. edit /etc/lsyncd.conf.xml
  2. add fields
  3. return to shell,run lsyncd

What is the expected output? What do you see instead?

SH_jjwxc135 log # lsyncd
Starting up
watching
Segmentation fault

What version of the product are you using? On what operating system?
lsyncd: v1.33

Linux kernel : Linux SH_jjwxc135 2.6.26-gentoo-r3 #1 SMP Fri Dec 5 11:09:04 CST 2008 x86_64 Quad-Core AMD Opteron(tm) Processor 2346 HE AuthenticAMD GNU/Linux

glibc version: 2.11

Please provide any additional information below.

1.when remove the setting ,lsyncd will ok
2.add option,and remove in lsyncd.conf.xml,run lsyncd ,will output this information :

.........

found new directory: <c in (null) -- P╜
found new directory: 嗷b in (null) -- P╜
found new directory: /var/www/gfs/abc.net/api.abc/var/Lair/Log/.. in (null) -- P╜
found new directory: <c in (null) -- P╜
found new directory: 嗷b in (null) -- P╜
found new directory: /var/www/gfs/abc.net/api.abc/www/scripts/dojo/io/xip_server.html in (null) -- P╜
found new directory: /var/www/gfs/abc.net/api.abc/www/scripts/dojo/cal/textDirectory.js in (null) -- P╜
found new directory: /var/www/gfs/abc.net/api.abc/www/scripts/dojo/dnd/HtmlDragAndDrop.js in (null) -- P╜
found new directory: /var/www/gfs/abc.net/api.abc/www/scripts/dojo/dot/ui-template/redball.png in (null) -- P╜
found new directory: p<d in (null) -- P╜

.........

strange symbol "P╜" ??

Moving/renaming large files

Originally filed by [email protected] on 2009-12-16T23:22:11

This is not really an issue, but a request. When I rename/move a large file,
rsync will copy it again and then delete the "old" version. If an event
MOVED_FROM to MOVED_TO occurs, wouldn't be better if you simply apply the
same sequence on the other side?

Wed Dec 16 20:54:15 2009: event MOVED_FROM:00234.m2ts triggered.
Wed Dec 16 20:54:15 2009: rsyncing /mnt/sync1/ --> /mnt/sync2/
Wed Dec 16 20:54:28 2009: event MOVED_TO:same_file.m2ts triggered.
Wed Dec 16 20:54:28 2009: rsyncing /mnt/sync1/ --> /mnt/sync2/

Instead, just move 00234.m2ts to same_file.m2ts without transfering it over
again.

SSH on another port

Originally filed by [email protected] on 2009-08-14T15:28:15

What steps will reproduce the problem?
My ssh server is not on port 22, how can I instruct lsyncd to use my other
port, I tried the xml config file with no luck.

What is the expected output? What do you see instead?
Fail

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

Please provide any additional information below.

Thanks
Thomas

Feedback for where in the sync queue we currently are

Originally filed by [email protected] on 2010-09-07T20:57:31

I'm using lsyncd to sync a great many directories to 6 servers. It's working very well for me - thanks!

Sometimes, completing an update can take several hours. It would be really useful if there was someway of discovering how many items in the queue still have to be synced. For a bonus, an estimate of the time left.

Maybe some kind of status sent to syslog or a local file?

Steve

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.