Re: RFE: Lockfile option for use in cronjobs

2008-04-10 Thread Dag Wieers

On Wed, 2 Apr 2008, Matt McCutchen wrote:


On Mon, 2008-03-31 at 11:43 +0200, Dag Wieers wrote:

Looking for an easy way to prevent a repetitive rsync to be running
multiple times, I was wondering if it could be useful to have an option
like:

--pidfile /some/path/rsync-mirror-org.pid

So that rsync can be run directly from cron without requiring a wrapper
script to do pidfile handling.

This way rsync on startup could check the pid-file, see if another rsync
is using this pid, and bail out with an error if it is. Otherwise clean up
the stale pidfile and continue.

I think this would be very useful to instruct mirrors how to configure it,
rather than providing some script that needs local customizations.


I'm not convinced that a pidfile is better implemented in rsync than in
a wrapper script, which could be distributed in support/ of the source
tree.  If you don't care about actually having the pid in the file, you
could use the flock(1) utility, which executes a command while holding a
flock(2) lock on a specified file:

flock --nonblock /some/path/rsync-mirror-org.lock rsync ...

If the process goes away, the lock will too, so no manual cleanup of
stale locks is needed.


The flock utility is great. I learn something new everyday :)

Thanks a lot !
--
--   dag wieers,  [EMAIL PROTECTED],  http://dag.wieers.com/   --
[Any errors in spelling, tact or fact are transmission errors]
--
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: RFE: Lockfile option for use in cronjobs

2008-04-10 Thread Dag Wieers

On Thu, 10 Apr 2008, Dag Wieers wrote:


On Wed, 2 Apr 2008, Matt McCutchen wrote:


On Mon, 2008-03-31 at 11:43 +0200, Dag Wieers wrote:

Looking for an easy way to prevent a repetitive rsync to be running
multiple times, I was wondering if it could be useful to have an option
like:

--pidfile /some/path/rsync-mirror-org.pid

So that rsync can be run directly from cron without requiring a wrapper
script to do pidfile handling.

This way rsync on startup could check the pid-file, see if another rsync
is using this pid, and bail out with an error if it is. Otherwise clean up
the stale pidfile and continue.

I think this would be very useful to instruct mirrors how to configure it,
rather than providing some script that needs local customizations.


I'm not convinced that a pidfile is better implemented in rsync than in
a wrapper script, which could be distributed in support/ of the source
tree.  If you don't care about actually having the pid in the file, you
could use the flock(1) utility, which executes a command while holding a
flock(2) lock on a specified file:

flock --nonblock /some/path/rsync-mirror-org.lock rsync ...

If the process goes away, the lock will too, so no manual cleanup of
stale locks is needed.


The flock utility is great. I learn something new everyday :)


Just noticed that the flock utility is fairly recent (since util-linux 
2.13) which means that on most systems you do not have it.


For RHEL that means only available since RHEL5 :-(

That could be one of the reasons to have it as part of rsync (to 
facilitate the distribution of a cron-job or simply make sure your mirrors 
are using best practices without too much complexity).


--
--   dag wieers,  [EMAIL PROTECTED],  http://dag.wieers.com/   --
[Any errors in spelling, tact or fact are transmission errors]
--
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Howto: Mac OS X to Windows VM

2008-04-10 Thread Rama D. Chavali

Hi,

I have a mac pro and a windows Vm which I want to keep sync.  I tired 
using other Sync programs but they do not seems to be working.  I tend 
to leave applications running which create their own temp files in its 
own specific folder, which caused the other sync programs to crash.  I 
tired SyncToy by MS and Unison.  I am looking for a bi-directional sync 
program that runs in the background and syncs any changes caused to the 
folder.  I heard that rsync can slove this problem for me, but I am not 
sure how.  Can any one be of hlep to me?


- Rama

--
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: Howto: Mac OS X to Windows VM

2008-04-10 Thread Matt McCutchen
On Wed, 2008-04-09 at 17:12 -0500, Rama D. Chavali wrote:
 I have a mac pro and a windows Vm which I want to keep sync.  I tired 
 using other Sync programs but they do not seems to be working.  I tend 
 to leave applications running which create their own temp files in its 
 own specific folder, which caused the other sync programs to crash.  I 
 tired SyncToy by MS and Unison.  I am looking for a bi-directional sync 
 program that runs in the background and syncs any changes caused to the 
 folder.  I heard that rsync can slove this problem for me, but I am not 
 sure how.

For bidirectional synchronization, I would recommend Unison.  AFAIK, it
doesn't have a mode to listen for changes in the background and act on
them immediately, but you could configure a cron job or scheduled task
to invoke Unison every few minutes.  If you encountered a problem with
Unison, you can get help via the mailing list at 
http://groups.yahoo.com/group/unison-users .

Matt


signature.asc
Description: This is a digitally signed message part
-- 
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: 3.0.2 get_xattr_names on sockets?

2008-04-10 Thread Wayne Davison
On Wed, Apr 09, 2008 at 04:19:42PM +0100, Paul Reilly wrote:
 I've compiled a fresh copy of rsync 3.0.2 (version info below) on
 MacOSX Leopard Server 10.5.1  and am doing an rsync of the whole
 system like this: [...] It works OK, but returns with a failure error
 code, and the following errors relating to files with sockets.

If you apply the patches/fileflags.diff, it adds some tests that skips
trying to get xattrs on devices and special files.  I also recommend the
patches/crtimes.diff for OS X.

..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 5381] make test fails without /etc/rsyncd.conf

2008-04-10 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=5381


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |ASSIGNED




--- Comment #1 from [EMAIL PROTECTED]  2008-04-10 09:53 CST ---
That test is doing a daemon-over-remote-shell test using a shell script as a
pretend remote shell to do a transfer with the localhost.  This expects the
rsyncd.conf file to be in the current directory of the test run, and does not
need the /etc/rsyncd.conf file to be present.  I have tested this on Linux to
verify this, so am curious what is causing it to fail for you.


-- 
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


some questions about do_server_sender and do_server_recv in rsync-0.1

2008-04-10 Thread alanqk

Hello,I'm studying the source code of rsync-0.1 recently.Because the latest 
version is so complicated, I have to start my study from rsync-0.1 for 
simplicity.
In the main.c file of rsync-0.1, there are two functions--do_server_sender 
and do_server_recv.I don't know when they work.When I want to transfer files 
between a local client and a remote server, I could use command: rsync src 
[EMAIL PROTECTED]:dest  or rsync [EMAIL PROTECTED]:src dest.But what's the 
commant format if I want to call --do_server_sender and do_server_recv?
And I wonder that -s and -S option each stands for in rsync command because 
they are related to 
do_server_sender and do_server_recv.
Thank you!
2008-04-10 



alanqk 
-- 
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 5365] --backup and --xattrs are not compatible

2008-04-10 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=5365





--- Comment #2 from [EMAIL PROTECTED]  2008-04-10 11:30 CST ---
now rsync version : 
3.0.2 (no patch)
option :
 --rsync-path=/usr/local/bin/rsync -avWAX --del --force --backup
--backup-dir=`date`  

3 errors :
1:
[sender] internal abbrev error!
rsync error: error in rsync protocol data stream (code 12) at xattrs.c(548)
[sender=3.0.2]
rsync: writefd_unbuffered failed to write 4 bytes [generator]: Broken pipe (32)
rsync error: error in rsync protocol data stream (code 12) at io.c(1543)
[generator=3.0.2]
rsync error: received SIGUSR1 (code 19) at main.c(1277) [receiver=3.0.2]

2:
Missing abbreviated xattr value, com.apple.ResourceFork, for
/Volumes/Data/Sauvegardes/DESC1_VOL1/20080410-16h14/DESCMDL/BASE-Studio.DF1
Missing abbreviated xattr value, com.apple.ResourceFork, for
/Partages/DESC1_VOL1/DESCMDL/.BASE-Studio.DF1.yaEeuH

3:
rsync: writefd_unbuffered failed to write 4 bytes [sender]: Broken pipe (32)
rsync: connection unexpectedly closed (913 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(635)
[sender=3.0.2]


There are the sames error with rsync 3.0.2 and the acls.diff and xattr.diff
patches. (with --protocol=29 no run too)
Thanks


-- 
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


DO NOT REPLY [Bug 5324] Reduce the performance penalty of --xattrs on Mac OS X

2008-04-10 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=5324





--- Comment #3 from [EMAIL PROTECTED]  2008-04-10 11:35 CST ---
 One solution to this might be to create a hash of all the names and xattr 
 data,
and then store the xattrs in a hash lookup.  That should speed things up quite
a bit when the list of unique xattr values grows large.

Thank you,
but how do it this hash ? 
thank's a lot

(I use now the rsync 3.0.2)


-- 
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


Re: rsync error: some files could not be transferred -- How to ignore

2008-04-10 Thread Matt McCutchen
On Tue, 2008-04-08 at 21:27 -0600, Kenneth Seal wrote:
 In my case, rsync displays the error code rsync error: some files  
 could not be transferred (code 23) and it kills my script. Do you  
 have any advice on how would I go about writing, researching etc. a  
 script to tell rsync to ignore such errors?

If I were you, I would try to fix the code 23 instead of ignoring it!
Rsync exits with code 23 when at least one non-fatal error occurs that
may affect the correctness of the transfer.  Perhaps the errors
currently causing the code 23 are unimportant, but if you ignore code
23, you risk missing more important errors in the future (e.g., the
nonexistence of a source argument).

Look for the specific error messages in the output that are causing the
code 23.  If it isn't immediately obvious how to fix them, post them to
the list and I'll take a look.  Or if you don't care about copying the
offending files, you can --exclude them.

Matt


signature.asc
Description: This is a digitally signed message part
-- 
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 5365] --backup and --xattrs are not compatible

2008-04-10 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=5365





--- Comment #3 from [EMAIL PROTECTED]  2008-04-10 13:57 CST ---
Yes, that's why this bug is marked as assigned and not fixed.


-- 
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


web site suggestion

2008-04-10 Thread Dan Pritts
Wayne et al,

2 suggestions/requests for the web pages.

1) could you add the appropriate CVE numbers to the security page?
e.g., for the recent release, CVE-2008-1720.

Optionally, include a link to the appropriate CVE page.  I'm not sure what
the status of cve.mitre.org is, this advisory doesn't show up there yet.
The first google hit is:

  http://nvd.nist.gov/nvd.cfm?cvename=CVE-2008-1720

2) add a link to the security page in the nav area at the top
of the site template.  The link you put at the top of the home
page is great but having security be always easily available would
be cool.

thanks!

danno
--
Dan Pritts, Sr. Systems Engineer
Internet2
office: +1-734-352-4953 | mobile: +1-734-834-7224

Be part of the future!
2008 Internet2 Strategic Planning
http://www.internet2.edu/strategicplanning
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html