ayourtch / lsyncd

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

Does -direct actually work? #66

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.lsyncd -nodaemon -log all -direct /home/david/workspace/test1 
/home/david/workspace/test2
kernels clocks_per_sec=100
Call: configure()
Inotify: inotify fd = 3
Call: initialize()
12:28:39 Function: Inotify.addWatch(/home/david/workspace/test1/, (true), 
(nil), (nil))
12:28:39 Inotify: addwatch(/home/david/workspace/test1/)->1
12:28:39 Normal: recursive startup rsync: /home/david/workspace/test1/ -> 
/home/david/workspace/test2/
12:28:39 Exec: /usr/bin/rsync [--delete] [-lts] [-r] 
[/home/david/workspace/test1/] [/home/david/workspace/test2/]
12:28:39 Call: getAlarm()
12:28:39 Debug: getAlarm returns: (false)
12:28:39 Masterloop: going into select (no timeout).
12:28:39 Call: collectProcess()
12:28:39 Delay: collected an event
12:28:39 Normal: Startup of '/home/david/workspace/test1/' finished.
12:28:39 Delay: Finish of Blanket on /home/david/workspace/test1/ = 0
12:28:39 Call: cycle()
12:28:39 Function: invokeActions('Sync1',(Timestamp: 43828305.35))
12:28:39 Call: getAlarm()
12:28:39 Debug: getAlarm returns: (false)
12:28:39 Masterloop: going into select (no timeout).

2.lsyncd -nodaemon -log all -rsync /home/david/workspace/test1 
/home/david/workspace/test2
kernels clocks_per_sec=100
Call: configure()
Inotify: inotify fd = 3
Call: initialize()
12:28:46 Function: Inotify.addWatch(/home/david/workspace/test1/, (true), 
(nil), (nil))
12:28:46 Inotify: addwatch(/home/david/workspace/test1/)->1
12:28:46 Normal: recursive startup rsync: /home/david/workspace/test1/ -> 
/home/david/workspace/test2/
12:28:46 Exec: /usr/bin/rsync [--delete] [-lts] [-r] 
[/home/david/workspace/test1/] [/home/david/workspace/test2/]
12:28:46 Call: getAlarm()
12:28:46 Debug: getAlarm returns: (false)
12:28:46 Masterloop: going into select (no timeout).
12:28:46 Call: collectProcess()
12:28:46 Delay: collected an event
12:28:46 Normal: Startup of '/home/david/workspace/test1/' finished.
12:28:46 Delay: Finish of Blanket on /home/david/workspace/test1/ = 0
12:28:46 Call: cycle()
12:28:46 Function: invokeActions('Sync1',(Timestamp: 43828311.91))
12:28:46 Call: getAlarm()
12:28:46 Debug: getAlarm returns: (false)
12:28:46 Masterloop: going into select (no timeout).

What is the expected output? What do you see instead?
running lsyncd command with the -direct should not be using rsync.  I was 
expecting the 1st output not to use rsync.

What version of the product are you using? On what operating system?
OS: ubuntu 
lsyncd -version: Version: 2.0.4

Please provide any additional information below.

Original issue reported on code.google.com by dma...@development.fairpoint.co.uk on 10 Jun 2011 at 11:32

GoogleCodeExporter commented 9 years ago
direct still uses rsync for startup sync since thats still the most effective 
way available to sync these directories when Lsyncd does not yet know of the 
changes happening.

After startup it will use /bin/cp, /bin/mv and /bin/rm

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