Re: Can rsync monitor a file system?

2006-06-27 Thread Stuart Halliday
Maybe you need Unison rather than rsync?

http://www.cis.upenn.edu/~bcpierce/unison/


-- 
Stuart Halliday
ECS Technology ltd
Registered in Scotland - #212513 


-Original Message-
From: [EMAIL PROTECTED]
To: rsync@lists.samba.org
Date: Mon, 26 Jun 2006 15:47:17 -0400
Subject: Can rsync monitor a file system?

 
 I am trying to get two servers to copy each others data to the other
 server.
 I need it to be done real time a not use a cron.
 
 Can rsync running as a daemon monitor the files system to trigger a
 transmission?
 
 If so how do I configure it?
 
 I am running Solaris 9.
 
 Thank you.
 
 __
 
 Charles Berman
 Senior Unix Administrator



-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Can rsync monitor a file system?

2006-06-27 Thread Martin Schröder

2006/6/27, Stuart Halliday [EMAIL PROTECTED]:

Maybe you need Unison rather than rsync?

http://www.cis.upenn.edu/~bcpierce/unison/


Or if you are using Linux, drdb (http://www.drbd.org/)?

Best
  Martin

PS: http://en.wikipedia.org/wiki/Top-posting :-(
--
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Can rsync monitor a file system?

2006-06-27 Thread Christoph Biedl
Tim H wrote...

 what about scripts running every 30 seconds on each machine,
 thats lighter then rsync just to compare..
 eg.
 
  Server1 
 ls -lR /*  ~/files1
 scp files1 SERVER2:~
 
  Server2 
 ls -lR /*  ~/files2
 (do a diff command here on files1 vs. files2)
 (if different, then run rsync -u)

Well, the things rsync does aren't much different from that. But
doing this every 30 seconds is a good way to get a lot of I/O load.

If Charles' intention is to get really fast replication he'd better
review his storage strategy. For example, using mysqld and a slave
daemon does this without overhead.

If there's no alternative to a file based storage, I strongly suggest to
do a triggered rsync, not polling. Linux has notifications if there was
a change in the file system (inotify, fam [file alteration monitor]).
I'm sure there are similar things for Solaris.

Christoph
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Can rsync monitor a file system?

2006-06-27 Thread Charles . Berman
How would you set a cron to run every 30 seconds? Otherwise it could work
for me.

__

Charles Berman
Senior Unix Administrator

Think Globally


   
 Tim H   
 [EMAIL PROTECTED] 
To 
 06/27/2006 01:42  Tony Abernethy
 AM[EMAIL PROTECTED],   
   [EMAIL PROTECTED],  
   rsync@lists.samba.org 
cc 
   
   Subject 
   Re: Can rsync monitor a file
   system? 
   
   
   
   
   
   




what about scripts running every 30 seconds on each machine,
thats lighter then rsync just to compare..
eg.

 Server1 
ls -lR /*  ~/files1
scp files1 SERVER2:~

 Server2 
ls -lR /*  ~/files2
(do a diff command here on files1 vs. files2)
(if different, then run rsync -u)


- Original Message -
From: Tony Abernethy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; rsync@lists.samba.org
Sent: Monday, June 26, 2006 1:16 PM
Subject: RE: Can rsync monitor a file system?


 To monitor the file system, you have to have something down inside
 the file system. Unless you know what you are doing, you don't really
 want to mess around with any such. Any slipup 

 copy each others data
 Now if this means an update to one implies an update to the other
 that should be doable.
 If it means a delete from one imples a delete from both
 (me, I'm brave and daring but I wouldn't even try.)

 I can see two reasonable ways.
 1) have an rsync daemon running on each server and a constantly running
 script on each server going either to or from the other server.
 2) have an rsync daemon running on one server and a constantly running
 script on the other, alternately pushing and pulling.

 Regardless, -u (--update) is probably what you want.
 You may want to exclude rsync temporaries somehow
 (--exclude='.*'  might be what you want)
 (Copying a temporary of a temporary after  ... if (when) something goes
 down)
 You can get a wee bit of a mess if cron jobs start stepping on each
other.
 No real damage other than producing multiple copies of dead temporaries.


  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] Behalf Of
  [EMAIL PROTECTED]
  Sent: Monday, June 26, 2006 2:47 PM
  To: rsync@lists.samba.org
  Subject: Can rsync monitor a file system?
 
 
 
  I am trying to get two servers to copy each others data to the other
  server.
  I need it to be done real time a not use a cron.
 
  Can rsync running as a daemon monitor the files system to trigger a
  transmission?
 
  If so how do I configure it?
 
  I am running Solaris 9.
 
  Thank you.
 
  __
 
  Charles Berman
  Senior Unix Administrator
 
  Think Globally
 
 
  The contents of this email are the property of the sender. If it
  was not addressed to you, you have no legal right to read it. If
  you think you received it in error, please notify the sender. Do
  not forward or copy without permission of the sender.
  --
  To unsubscribe or change options:
  https://lists.samba.org/mailman/listinfo/rsync
  Before posting, read:
http://www.catb.org/~esr/faqs/smart-questions.html

 --
 To unsubscribe or change options:
https://lists.samba.org/mailman/listinfo/rsync
 Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html




The contents of this email are the property of the sender. If it was not 
addressed to you, you have no legal right to read it. If you think you received 
it in error, please notify the sender. Do not forward or copy without 
permission of the sender.
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Can rsync monitor a file system?

2006-06-27 Thread Daniel Laffien

Hi there,

I'm using the FAM tool FILESCHANGED with a small script, that calls RSYNC  
delayed after
FILESCHANGED reports a changed file in a tree, maybe this is useful for  
you.


fileschanged -r -t 10 [path] | while read file; do
rsync [path]
done

I'm sycing the whole tree and not the single changed file, so it would be  
usefull to
filter the FILESCHANGED output during the rsync transfer, but this woul be  
heavy in

a small shell script I think...

Greetz,
Daniel

Am Tue, 27 Jun 2006 16:26:19 +0200 hat [EMAIL PROTECTED]  
geschrieben:



How would you set a cron to run every 30 seconds? Otherwise it could work
for me.

__

Charles Berman
Senior Unix Administrator

Think Globally


Tim H
 [EMAIL PROTECTED]
To
 06/27/2006 01:42  Tony Abernethy
 AM[EMAIL PROTECTED],
   [EMAIL PROTECTED],
   rsync@lists.samba.org
cc
  Subject
   Re: Can rsync monitor a file
   system?




what about scripts running every 30 seconds on each machine,
thats lighter then rsync just to compare..
eg.

 Server1 
ls -lR /*  ~/files1
scp files1 SERVER2:~

 Server2 
ls -lR /*  ~/files2
(do a diff command here on files1 vs. files2)
(if different, then run rsync -u)


- Original Message -
From: Tony Abernethy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; rsync@lists.samba.org
Sent: Monday, June 26, 2006 1:16 PM
Subject: RE: Can rsync monitor a file system?



To monitor the file system, you have to have something down inside
the file system. Unless you know what you are doing, you don't really
want to mess around with any such. Any slipup 

copy each others data
Now if this means an update to one implies an update to the other
that should be doable.
If it means a delete from one imples a delete from both
(me, I'm brave and daring but I wouldn't even try.)

I can see two reasonable ways.
1) have an rsync daemon running on each server and a constantly running
script on each server going either to or from the other server.
2) have an rsync daemon running on one server and a constantly running
script on the other, alternately pushing and pulling.

Regardless, -u (--update) is probably what you want.
You may want to exclude rsync temporaries somehow
(--exclude='.*'  might be what you want)
(Copying a temporary of a temporary after  ... if (when) something goes
down)
You can get a wee bit of a mess if cron jobs start stepping on each

other.

No real damage other than producing multiple copies of dead temporaries.


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of
 [EMAIL PROTECTED]
 Sent: Monday, June 26, 2006 2:47 PM
 To: rsync@lists.samba.org
 Subject: Can rsync monitor a file system?



 I am trying to get two servers to copy each others data to the other
 server.
 I need it to be done real time a not use a cron.

 Can rsync running as a daemon monitor the files system to trigger a
 transmission?

 If so how do I configure it?

 I am running Solaris 9.

 Thank you.

 __

 Charles Berman
 Senior Unix Administrator

 Think Globally


 The contents of this email are the property of the sender. If it
 was not addressed to you, you have no legal right to read it. If
 you think you received it in error, please notify the sender. Do
 not forward or copy without permission of the sender.
 --
 To unsubscribe or change options:
 https://lists.samba.org/mailman/listinfo/rsync
 Before posting, read:

http://www.catb.org/~esr/faqs/smart-questions.html


--
To unsubscribe or change options:

https://lists.samba.org/mailman/listinfo/rsync

Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html





The contents of this email are the property of the sender. If it was not  
addressed to you, you have no legal right to read it. If you think you  
received it in error, please notify the sender. Do not forward or copy  
without permission of the sender.



--
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Can rsync monitor a file system?

2006-06-27 Thread Christoph Biedl
[EMAIL PROTECTED] wrote...

 How would you set a cron to run every 30 seconds? Otherwise it could work
 for me.

With a start every 30 seconds you're in the high risk an an overrun.
Don't do cron, use a simple shell script with while true;  and 
sleep 30.

But believe me, this is a bad idea.

Christoph
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: no true incrementals with rsync?

2006-06-27 Thread tim h

I tried compare-dest... does it automatically hardlink, or does
link-dest hardlink or both? may my problem is I tested on a cygwin
windose macine and there is no linking.

On 6/26/06, Wayne Davison [EMAIL PROTECTED] wrote:

On Mon, Jun 26, 2006 at 10:15:38AM -0700, tim594 wrote:
 With traditional backup systems, you keep a base (full backup, let's
 say every 30 days), then build incrementals on top of that, eg. (what
 has changed since the base).

That's what the --compare-dest=FULL_DIR option does.  See also the
--link-dest=YESTERDAY option, which allows you to make each day's backup
look like a full backup, but only take up the space of an incremental
(due to the hard-links created between unchanged files).

 With rsync 2.6.6, when i use --delete or --del with the --backup
 command, the files it deletes are not backed up.

They certainly should be (and they are in all the testing I've done).

..wayne..


--
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


RE: Re: Can rsync monitor a file system?

2006-06-27 Thread tony
[EMAIL PROTECTED] wrote:

[EMAIL PROTECTED] wrote...

 How would you set a cron to run every 30 seconds?
Otherwise it could work
 for me.

With a start every 30 seconds you're in the high
risk an an overrun.
Possibly saved by max connections =1 or such.

Don't do cron, use a simple shell script with
while true;  and 
sleep 30.

But believe me, this is a bad idea.
I suspect you're right;) 
When things take off automatically on their own, you get
troubles in places you didn't know you had places. 
Debris from failed transfers. 
Subtle errors that put an extra copy one level off.
(mirror in a mirror, ...  ... until you run out of ...)
(and that's without knowing what I'm talking about)
(Figure reality has several considerably worse ...)

I think that handling deletes becomes a nightmare, or
at least must be handled carefully and severly restricts
the choices possible for updates.
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Rsync dies with Invalid file index: error message

2006-06-27 Thread Frank Fegert
Wayne,

Frank Fegert wrote:
 Wayne,

 thanks for your prompt response!

 [self-inflicted pain snipped]

thanks for your help, but never mind! As usual, the problem
was sitting in front of the keyboard, between the headphones
;-)
For security reasons i use a wrapper script on the sending
machine, which is bound to the SSH-key used by the receiving
side to authenticate. The wrapper only allows rsync commands
and ends with the usual 'exit 0' if everything went OK. This
seems to confuse either SSH or rsync. As soon as i took out
the 'exit 0' at the end of the wrapper, all FS-rsyncs startet
to work out just fine.

Thanks  Regards,

Frank
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Re: Can rsync monitor a file system?

2006-06-27 Thread Tim H
couldnt you do something like this?:

always running.sh---
while true
do
if file not exists isrunning.txt
sh checkfiles.sh
sleep 30
done

checkfiles.sh---
# compare dirlist here
if [ need to run rsync ] and [file not exist isrunning.txt]
touch isrunning.txt
rsync .
rm -f isrunning.txt
fi



- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; rsync@lists.samba.org
Sent: Tuesday, June 27, 2006 12:41 PM
Subject: RE: Re: Can rsync monitor a file system?


 [EMAIL PROTECTED] wrote:
 
 [EMAIL PROTECTED] wrote...
 
  How would you set a cron to run every 30 seconds?
 Otherwise it could work
  for me.
 
 With a start every 30 seconds you're in the high
 risk an an overrun.
 Possibly saved by max connections =1 or such.

 Don't do cron, use a simple shell script with
 while true;  and
 sleep 30.
 
 But believe me, this is a bad idea.
 I suspect you're right;)
 When things take off automatically on their own, you get
 troubles in places you didn't know you had places.
 Debris from failed transfers.
 Subtle errors that put an extra copy one level off.
 (mirror in a mirror, ...  ... until you run out of ...)
 (and that's without knowing what I'm talking about)
 (Figure reality has several considerably worse ...)

 I think that handling deletes becomes a nightmare, or
 at least must be handled carefully and severly restricts
 the choices possible for updates.
 --
 To unsubscribe or change options:
https://lists.samba.org/mailman/listinfo/rsync
 Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: no true incrementals with rsync?

2006-06-27 Thread Wayne Davison
On Tue, Jun 27, 2006 at 09:02:49AM -0700, tim h wrote:
 I tried compare-dest... does it automatically hardlink, or does
 link-dest hardlink or both?

Just --link-dest uses hard-links.  Using --compare-dest just omits
matching files from the destination that are up-to-date in the
compare-dest hierarchy.

..wayne..
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


DO NOT REPLY [Bug 3845] Add --remove-source-files

2006-06-27 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=3845





--- Comment #2 from [EMAIL PROTECTED]  2006-06-27 22:59 MST ---
Is there a possible ETA for this feature?  It would nicely solve the problem I
have with files getting left over after a GPRS link goes down in mid-transfer. 
My current, and rather gross, solution is to summarily delete everything in the
transfer directory after rsync completes successfully.  

--jc

(In reply to comment #0)
 Let's have a --remove-source-files option that works like --remove-sent-files
 but removes from the source everything in the file list, not just transferred
 files.  Then I could use rsync for my primary move command (via a wrapper
 called mv2) as well as my primary copy command (cp2).
 


-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the QA contact for the bug, or are watching the QA contact.
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html