Re: rsync and missing files?

2002-04-25 Thread Dave Dykstra

On Wed, Apr 17, 2002 at 10:57:56AM -0500, John Madden wrote:
 send_files failed to open //home/user/Maildir/new/_dwG.NeZv8.blah: No such
 file or directory
 rsync error: partial transfer (code 23) at main.c(578)

On Tue, Apr 23, 2002 at 11:50:41AM -0701, Jos Backus wrote:
   I'd be quite happy with rsync just throwing a warning and going to the
   next file, or at least there being an option to turn on such behavior.
  
   Isn't that the current behaviour?
  
  No, not at all.  As per my original post, rsync will complain about the list
  of files it can't open and then just exit.  At least, that's what it appears
  to be doing!
 
 Hm, perhaps that can be fixed.

The code is currently doing a continue after that error, not an exit, so
it should be continuing on to do the rest of the files before it exits.
However, an error message is printed at exit time.

- Dave Dykstra

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



Re: no output from perl script

2002-04-25 Thread Joseph Annino

I see a lot of good advice has been posted about stuff that is quite good to
know about perl.

A simpler solution though might be the File::Rsync module available on CPAN.
I use it a lot and it works very well.  It will generate the rsync command
line for you, and it can be given a callback which will be called with each
line of rsync's output.  Or you can grab the output as a list after the
command completes.

The only shortfall is it gets output one line at a time, so while --verbose
will work well with it, --progress is less useful because it updates the
percent ticker without moving on to the next line, so your callback won't
see it until that file is done.


-- 
Joseph Annino Consulting - Perl, PHP, MySQL, Oracle, etc.
[EMAIL PROTECTED] - http://www.jannino.com


On 4/22/02 7:17 PM, Robert Silge [EMAIL PROTECTED] wrote:

 Here is the first Perl script I've tried to write to run rsync. It seems to
 work, but I don't see the progress like I should. I apologize if it's
 sloppy, I should add that it's not only the first perl script I've written
 for rsync, it's the first perl script I've written at all.
 
 ___
 #!/usr/bin/perl -w
 
 print 
 This command will DELETE EVERYTHING in Remote~/Research
 UNLESS it is also found in Local~/Research.
 Do you really wish to do this?
 [N/yes]: ;
 
 $answer = STDIN;
 chomp $answer;
 
 
 if ( $answer eq yes ) {
   print \nOK, here we go.\n;
   `rsync -auvz --progress --delete -e ssh
 Remote:/home/user/rsync-testing /home/user`
   }
 
 else {
   print \nabort mission\n;
 
 }
 
 
 Thanks for the help.
 
 -Rob
 


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



Re: rsync 2.5.5 --delete-after option bug

2002-04-25 Thread Dave Dykstra

On Tue, Apr 23, 2002 at 12:08:56PM -0400, Corey Stup wrote:
 
The option --delete-after does not seem to work.
  
In a command such as
  
rysnc -avzSH --progress --stats --delete-after remote::XYZ/dirX /export/home
files removed from the source are not removed at the destination.
However subsituting --delete for --delete-after does cause the files
to be deleted.
  
I'm I missing something?
 
 You need both --delete AND --delete-after.   --delete-after just
 modifies --delete.

I think --delete-after should imply --delete.  Would someone like to work
up the simple patch to the code and the man page?

- Dave

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



Re: rsync server over SSH

2002-04-25 Thread Dave Dykstra

On Tue, Apr 16, 2002 at 01:04:09PM +1000, Martin Pool wrote:
 I haven't had a chance to test this recently, but Dave just reminded
 me that it ought to merge soon and I agree.
 
 I was thinking about this the other day in the context of the
 Bitkeeper bk url manpage (if Colin will forgive me :-).
 
   http://www.bitkeeper.com/manpages/bk-url-1.html
 
 They have basically the same problem of wanting to do access locally,
 over a native protocol, and over ssh.  I'm not suggesting we adopt
 their scheme.
 
 It seems like people might want to set up accounts (called say
 backup) whose login shell is set to 'rsync --daemon'.  I'd like that
 to work if it can.  It kind of overlaps with command-limited ssh keys,
 but I think some admins would feel more comfortable with the former.

That's easily done without modifying rsync any more than JD's current
patch.  A login shell has to be a program or #! script, and it can easily
be written to ignore the args and always do rsync --daemon, or to print an
error and exit if the args are not '-c rsync --daemon' which is the
syntax I've observed being passed to restricted login shells that I've
written.



 SSH2 also has a subsystem configuration option that seems to let it
 provide tunnelled servers directly.  I wonder if we can integrate with
 that?

I don't know much about it, but from what I can see I don't think there's
much value in the SSH subsystem stuff, especially not for rsync.  I think
it's probably only useful for services that are standard in the SSH package
and not for add-on things like an rsync server.


 I'm not sure if I said so before, but I'm not completely comfortable
 with the -e option invoking the rsync-over-ssh behaviour.  I can see
 how from one point of view this is quite elegant, but I'm concerned
 that it overloads the behaviour of the option in a confusing way: it
 would change it from merely modifying a mode selected by a
 single-colon url, to choosing a new mode of behaviour.   (Imagine, for
 example, somebody who has a shell alias that sets up rsync -e.)

If somebody has an alias set to rsync -e then they're currently getting big
warnings whenever they use :: or rsync://.  They should instead be
setting $RSYNC_RSH.


 A clearer way to put that is that at the moment we have six modes of
 operation; this will make eight (counting upload and download
 separately).  I think it's fair to insert rsync-over-ssh at that
 level.  It is already a source of confusion and we have to be careful
 not to make it worse.
 
 All of the others are distinguished by whether the source and
 destination contain colons, etc.  I think we ought to try to retain
 that convention if possible.

I see your point, but what syntax would you suggest?  JD's original
suggestion was to use three colons instead of two.  Uggh!  Perhaps a
URL-based selection similar to what Bitkeeper uses could be made to be OK,
but I can't envision it.   We need some way to specify what the transport
program is, be it rsh or ssh or remsh or whatever.  I think JD's current
implementation is the best we're going to do to reduce confusion.


 Thanks again for the patch.  These issues should be pretty easy to
 decide, and I think it will be a large improvement in utility.

- Dave

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



Re: 4.4BSD chflags support for rsync

2002-04-25 Thread Dave Dykstra

I'm sorry for the long delay in replying.  I'm cleaning up my rsync mailbox
now after a one week vacation and about a month of not having time to look
at it.

I think the --flags patch is probably fine, except that that the short
description should at least say preserve file flags instead of just
preserve flags since most people wouldn't know what flags means.

I don't like --ignore-existing, though.  What's the point of using rsync
if you're not updating existing files?

- Dave



On Fri, Mar 08, 2002 at 08:18:11PM +0100, Rolf Grossmann wrote:
 Hi Dave,
 
 on Fri, 8 Mar 2002 11:55:10 -0600 Dave Dykstra wrote 
 concerning Re: 4.4BSD chflags support for rsync something like this:
 
  New options are usually handled by just letting the remote side fail when
  it doesn't understand the option, as you're doing.  Perhaps you just
  shouldn't include it with -a.
 
 Ok, changed that. I also put a note in the manpage.
 
  At a minimum, you'd need to update the rsync.yo and rsync.1 versions of
  the man page before it could be accepted.
 
 Heh, I knew I forgot something. ;) I've updated the patch. When building
 the new rsync.1 manpage, an entry about --ignore-existing was also included
 and is contained in my patch.
 
 Please let me know what you think.
 
 Thanks, Rolf
 
  On Fri, Mar 01, 2002 at 07:12:47PM +0100, [EMAIL PROTECTED] wrote:
  Hi,
  
  I've changed rsync to support the BSD change file flags. However, this
  raises some compatibility problems, especially when including it with
  the -a option. If the remote host does not understand the new option
  for updating file flags, the user gets an error message about an
  unknown option. How should I handle this?
  
  If you'd like to look at the patch (and preferably integrate it with the
  main source ;)) you can get it at http://www.progtech.net/rsync.flags-patch
  All comments are welcome, but please CC me directly as I'm not on the list.
  
  Thanks and bye,
  Rolf
 
 -- 
 To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
 Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html

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



Re: Rsync ownership/group/permission on Windows and Linux question

2002-04-25 Thread Dave Dykstra

I'm cleaning out my rsync mailbox and it looks like nobody responded
to your questions.

On Mon, Mar 25, 2002 at 02:56:18AM -0600, Poe Chen wrote:
 Hi, all,
 
 I'd like to know if there is a way to set the ownership/group/permission
 when you are transfering files from a Windows clients to a Linux rsync
 server.
 
 I've tried following configurations, and none of them work.
 
 rsync -av --owner=test -g MyFolder 192.168.100.1::backup/test
 
 rsync -av --owner=500 -g MyFolder --numeric-ids 192.168.100.1::backup/test
 
 (500 is numeric id for user test)

The --owner option does not take a paramter.  It just means to
preserve the original owner when possible.

 Is it possible that you can setup a rsync server that will preserve the
 ownership/group from a Windows clients? 

I don't know much about Windows clients but I don't see why it wouldn't
as long as the writer is running as root (or whatever the privileged user
is on Windows NT/2000).

 Or, is it possible to run rsync
 client so that when the server stores the files, it sets to the user/group
 specified at client's rsync option?

Not on the command line, but if the receiver is runing as a nonprivileged
user id then all the files will be owned by that user id.


 So far, Linux to Linux rsync has no problem at all.  The Windows clients
 (NT and Win2000) are using cygwin1.dll v1.3.10 and rsync 1.5.4.
 
 Any suggestions will be appreciated.

- Dave Dykstra

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



Re: Rsync message: client: nothing to do

2002-04-25 Thread Dave Dykstra

On Tue, Mar 26, 2002 at 06:18:40PM -0800, Yuri Kretov wrote:
 Hello,
 
 May be I am wrong, but why rsync tells me that it's nothing to do?
 I just want to synchronize the directory's attributes (with no recursion) such as:
 permissions, owner, group and time.
 
 Example:
 ===
 
 host1# pwd
 /var/rsync/host2
 !
 ! At first, I copy only subdirecory /usr/local/samba/lib 
 !
 host1# mkdir -p usr/local/samba
 host1# rsync -a --delete -e ssh host2:/usr/local/samba/lib 
/var/rsync/host2/usr/local/samba
 !
 ! Then, I want to update the attributes for /usr/local/samba, which was created by 
mkdir
 !
 host1# rsync -vpogt -e ssh host2:/usr/local/samba /var/rsync/host2/usr/local
 !
 ! So, the diagnostic appears:
 !
 skipping directory /usr/local
 client: nothing to do: perhaps you need to specify some filenames or the --recursive 
option?
 
 Thanks,
   -Yuri


I hope you've got this figured out by now, but I didn't see any responses
to your question.  The answer is: you need to specify the recursive
option.  The -a option you used in the first command implies it, but you
left it out of the second command.

- Dave Dykstra

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



Re: Handling of backup files - two new features proposed

2002-04-25 Thread Dave Dykstra

On Mon, Apr 01, 2002 at 06:14:38PM +0200, Michael Zimmermann wrote:
 Dear list members,
 
 there are two new rsync-features I made up and would like to discuss with you.
 
 If you think these new features might be useful for the whole rsync-community,
 please give me a note and I'll send you the patches (or post them here).
 
 
 
 1.) Setting owner and/or group of backup files.
 
 In our servers I'm using rsync to backup to a hot standby machine.
 The users have access to this backup-server too, so that they
 can retrieve older versions of their files. At the same time the backup
 copies should not count in the user's quota (and/or should only
 be deletable by root or a special group-admin).
 
 To accomplish this, the backup files get their user and/or group set to
 a special user and/or group in our local version of rsync.
 
 Two new options control this behaviour
 
  --backup-owner=USER
  --backup-group=GROUP


I don't like that; I think it is too special purpose.  Can't you follow
up the rsync with a find/chown?



 2.) Adding a non-default suffix to backup-files in the backup-directory too
 
 I'm not sure, wether this might be really useful but it was one of the
 solutions for our backup-requirements which I was trying out.
 
 The idea was to put the backup-directory onto another disc (with
 different quotas and read-only access) and at the same time give 
 the user access to more than one backup-version of his files within 
 his subtree-structure. This would be done by setting --suffix to (say) 
 the date and time of the backup.
 
 The behaviour change to rsync is:
 
  --suffix is added to the backup-files in the backup directory too, 
  if both are given and the suffix is not equal to the default-suffix 
  (or the --suffix option is specified after the --backup-dir option).

That sounds like a fine idea to me.


 Perhaps different environments need different solutions, hence I
 propose to implement both features.
 
 Highly interested in your comments.

- Dave Dykstra

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



Re: Patch to avoid 'Connection reset by peer' error for rsync on cygwin

2002-04-25 Thread Dave Dykstra

Does anybody know if this might cause problems on non-Windows machines?
Would shutdown need to be checked in configure, or is it implemented on
all Unix variants?  I don't recall ever seeing a need for it on Unix.

- Dave

On Wed, Apr 03, 2002 at 11:39:57AM +0100, Max Bowsher wrote:
 The problem is caused because rsync does not close its sockets, and WinSock is a
 quite strict on this. The solution is to shutdown and close the fd.
 This is a 5-minute hack I've done to fix the obvious occurrences of the problem.
 It might be better to extend rsyncs cleanup functions for this, but here it is
 anyway to alert people to the problem and its fix.
 
 Max.
 
 BEGIN PATCH
 diff -mru rsync-2.5.5/clientserver.c rsync-2.5.5-tweaked/clientserver.c
 --- rsync-2.5.5/clientserver.c Wed Mar 27 01:03:13 2002
 +++ rsync-2.5.5-tweaked/clientserver.c Wed Apr  3 11:01:57 2002
  -486,39 +486,44 
   }
 
   if (!read_line(fd, line, sizeof(line)-1)) {
 -  return -1;
 +  goto exitwithnomodule;
   }
 
   if (sscanf(line,RSYNCD: %d, remote_version) != 1) {
io_printf(fd,ERROR: protocol startup error\n);
 -  return -1;
 +  goto exitwithnomodule;
   }
 
   while (i == -1) {
line[0] = 0;
if (!read_line(fd, line, sizeof(line)-1)) {
 -   return -1;
 +   goto exitwithnomodule;
}
 
if (!*line || strcmp(line,#list)==0) {
 send_listing(fd);
 -   return -1;
 +   goto exitwithnomodule;
}
 
if (*line == '#') {
 /* it's some sort of command that I don't understand */
 io_printf(fd,ERROR: Unknown command '%s'\n, line);
 -   return -1;
 +   goto exitwithnomodule;
}
 
i = lp_number(line);
if (i == -1) {
 io_printf(fd,ERROR: Unknown module '%s'\n, line);
 -   return -1;
 +   goto exitwithnomodule;
}
   }
 
   return rsync_module(fd, i);
 +
 +exitwithnomodule:
 + shutdown(fd,SHUT_WR);
 + close(fd);
 + return -1;
  }
 
 
 END PATCH
 
 
 
 
 -- 
 To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
 Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html

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



Re: rsync 2.5.5 --delete-after option bug

2002-04-25 Thread Wayne Davison

On Thu, 25 Apr 2002, Dave Dykstra wrote:
 I think --delete-after should imply --delete.  Would someone like to
 work up the simple patch to the code and the man page?

Sure.  Here's one (note that the OPT_DELETE_AFTER enum was already
defined for some reason).

..wayne..

---8--8--8--8---cut here---8--8--8--8---
Index: options.c
--- options.c   16 Apr 2002 01:38:21 -  1.92
+++ options.c   25 Apr 2002 21:57:48 -
 -306,7 +306,7 
   {delete,   0,  POPT_ARG_NONE,   delete_mode , 0, 0, 0 },
   {existing, 0,  POPT_ARG_NONE,   only_existing , 0, 0, 0 },
   {ignore-existing,  0,  POPT_ARG_NONE,   opt_ignore_existing , 0, 0, 0 },
-  {delete-after, 0,  POPT_ARG_NONE,   delete_after , 0, 0, 0 },
+  {delete-after, 0,  POPT_ARG_NONE,   0,  OPT_DELETE_AFTER, 0, 0 },
   {delete-excluded,  0,  POPT_ARG_NONE,   0,  OPT_DELETE_EXCLUDED, 0, 0 
},
   {force,0,  POPT_ARG_NONE,   force_delete , 0, 0, 0 },
   {numeric-ids,  0,  POPT_ARG_NONE,   numeric_ids , 0, 0, 0 },
 -476,7 +479,12 
  * non-default setting. */
modify_window_set = 1;
break;
-
+
+   case OPT_DELETE_AFTER:
+   delete_after = 1;
+   delete_mode = 1;
+   break;
+
case OPT_DELETE_EXCLUDED:
delete_excluded = 1;
delete_mode = 1;
Index: rsync.yo
--- rsync.yo8 Apr 2002 05:30:28 -   1.96
+++ rsync.yo25 Apr 2002 22:01:47 -
 -485,11 +485,12 
 dit(bf(--delete-excluded)) In addition to deleting the files on the
 receiving side that are not on the sending side, this tells rsync to also
 delete any files on the receiving side that are excluded (see --exclude).
+Implies --delete.

 dit(bf(--delete-after)) By default rsync does file deletions before
 transferring files to try to ensure that there is sufficient space on
 the receiving filesystem. If you want to delete after transferring
-then use the --delete-after switch.
+then use the --delete-after switch. Implies --delete.

 dit(bf(--ignore-errors)) Tells --delete to go ahead and delete files
 even when there are IO errors.
---8--8--8--8---cut here---8--8--8--8---


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



Re: [rproxy-devel] rdiff deltas not very good compared to pysync, why?

2002-04-25 Thread Donovan Baarda

On Wed, Apr 24, 2002 at 09:46:09PM -0400, Shirish H. Phatak wrote:
 Hi Martin,
 
   I can definitely help in managing the librsync package, especially 
 since I will be maintaining our local tree anyway. As of now, I don't 
 have the resources to get the Windows stuff tested; however, I can 
 handle the Unix side of things. Maybe Donovan would be interested in 
 managing the Windows effort?

I am also interested in helping take over librsync mantainence. Ordinarily
I'm a pure linux development person, but in this case I was sponsored by
Accellion to do a Python wrapper that had to work under windows.

I'm also pretty familiar with how the algo works from my work on Pysync.

   I am fine with either Sourceforge or samba.org. I have used the 
 former quite extensively during Intermezzo development, but most of my 
 usage was CVS access, so I don't think either site would make much of a 
 difference.

I really like a bug-tracker and the extra stuff SF gives you. I also find SF
is a fairly centralised place for it all. However, if samba.org can provide
the same facilities...

-- 
--
ABO: finger [EMAIL PROTECTED] for more info, including pgp key
--

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



Re: Block of unwanted zeros in a dest file

2002-04-25 Thread Dave Dykstra

Eric, which version of Sun operating system were you running, and was there
any NFS involved?  What's a NAS disk?  I had a user who reported having
rsync (a CVS version between 2.5.4 and 2.5.5) produce a file filled with
nulls but he was copying from a Solaris client which was mounting over NFS
from a Sunos4 server, and the files were not readable because he was
running as root on the Solaris client and the filesystem was not exported
from the Sunos4 server to allow root access.  The problem went away when he
used another operating system.  We speculated it may have been that the
Sunos4 NFS implementation wasn't returning the proper error code.

I haven't seen anbody else report problems with rsync producing files of
nulls, but it's pretty disconcerting.

- Dave Dykstra


On Mon, Mar 25, 2002 at 12:28:06PM -0700, Eric Whiting wrote:
 I'm syncing from a linux box (NAS disk) to a sun (NAS disk).
 
 I just found a file on the destination sun with zeros from bytes 8192 to
 32767. (the source file had lots of 'good' random bytes). The rest of
 the file compares properly. Repeatedly running rsync to send the file
 didn't fix it. I ran a -c transfer (checksum) and it fixed the file.
 
 I'm using 2.5.3 on both sides with the -z turned off. (I thought that
 was somewhat 'safe')
 
 Is this a know issue? I'll upgrade to 2.5.4 (with the fixed zlib) and
 see if it acts the same.
 
 eric

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



Re: Block of unwanted zeros in a dest file

2002-04-25 Thread Eric Whiting

Dave Dykstra wrote:
 
 Eric, which version of Sun operating system were you running, and was there
 any NFS involved?  What's a NAS disk?  

Yes NFS on both ends. Solaris 8 on destination. Netapps NAS boxes on
both ends.

NAS -- Network Attached Storage. Netapps F720 NFS 'toaster' boxes. (lots
of $$ but they mostly work well.)

I'm using 2.5.5 now and am not aware of this problem happening again.
I'll just consider it fixed..

eric



 I had a user who reported having
 rsync (a CVS version between 2.5.4 and 2.5.5) produce a file filled with
 nulls but he was copying from a Solaris client which was mounting over NFS
 from a Sunos4 server, and the files were not readable because he was
 running as root on the Solaris client and the filesystem was not exported
 from the Sunos4 server to allow root access.  The problem went away when he
 used another operating system.  We speculated it may have been that the
 Sunos4 NFS implementation wasn't returning the proper error code.
 
 I haven't seen anbody else report problems with rsync producing files of
 nulls, but it's pretty disconcerting.
 
 - Dave Dykstra
 
 On Mon, Mar 25, 2002 at 12:28:06PM -0700, Eric Whiting wrote:
  I'm syncing from a linux box (NAS disk) to a sun (NAS disk).
 
  I just found a file on the destination sun with zeros from bytes 8192 to
  32767. (the source file had lots of 'good' random bytes). The rest of
  the file compares properly. Repeatedly running rsync to send the file
  didn't fix it. I ran a -c transfer (checksum) and it fixed the file.
 
  I'm using 2.5.3 on both sides with the -z turned off. (I thought that
  was somewhat 'safe')
 
  Is this a know issue? I'll upgrade to 2.5.4 (with the fixed zlib) and
  see if it acts the same.
 
  eric

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



testing

2002-04-25 Thread Rich Winkel

123


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



Re: invalid uid rsync (was Re: rsync HELP!!!) (get a clue about writing Subject lines)

2002-04-25 Thread Martin Pool

On 25 Apr 2002, Dave Dykstra [EMAIL PROTECTED] wrote:
 Did you mean rsync's call to chroot, or a chroot around the whole
 invocation of rsync?  Rsync's chroot doesn't happen until after the uid =
 in rsyncd.conf is processed, so that still works without copying in the
 passwd file. 

Oh, quite right, sorry.

--
Martin

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



symmetric mirroring (was testing)

2002-04-25 Thread Rich Winkel

Sorry for the junk mail, it seems my last post was lost in the ether,
despite being successfully delivered to lists.samba.org (!)
Very frustrating, since I didn't keep a copy of it.

My question was regarding what might be called symmetric mirroring,
where two sets of identical files, both being simultaneously updated,
are periodically syncronized.

Has anyone implemented this?  I posted a script which I think
would work.  If my original post doesn't show up I guess I'll have
to type it in again.  At any rate, implementing it in rsync doesn't
seem like it would be too difficult.

Thanks,
Rich


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



Re: Patch to avoid 'Connection reset by peer' error for rsync on cygwin

2002-04-25 Thread Martin Pool

On 25 Apr 2002, Dave Dykstra [EMAIL PROTECTED] wrote:
  The problem is caused because rsync does not close its sockets, and WinSock is a
  quite strict on this. The solution is to shutdown and close the fd.
  This is a 5-minute hack I've done to fix the obvious occurrences of the problem.
  It might be better to extend rsyncs cleanup functions for this, but here it is
  anyway to alert people to the problem and its fix.

 Does anybody know if this might cause problems on non-Windows machines?
 Would shutdown need to be checked in configure, or is it implemented on
 all Unix variants?  I don't recall ever seeing a need for it on Unix.

From memory, Practical TCP Programming says that this behaviour is
caused by a misunderstanding of the sockets API by the WinSock
programmers.  The correct meaning of shutdown() on Unix is to throw
away any outstanding data and close the socket immediately.  Normally,
when you close a socket, you do want to let any pending data get
across, so it's rarely used.

On Windows shutdown() does not throw away data, and should be called.
(Trust M$ to get it backwards and force everybody else to adapt.)

So the patch cannot go in as is, because I think it will break Unix.
Something like it can go in, #ifdefed for W32.

--
Martin

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



Re: symmetric mirroring (was testing)

2002-04-25 Thread Martin Pool

On 25 Apr 2002, Rich Winkel [EMAIL PROTECTED] wrote:
 Sorry for the junk mail, it seems my last post was lost in the ether,
 despite being successfully delivered to lists.samba.org (!)
 Very frustrating, since I didn't keep a copy of it.
 
 My question was regarding what might be called symmetric mirroring,
 where two sets of identical files, both being simultaneously updated,
 are periodically syncronized.

If each side updates a non-overlapping set of files you can do this
using --update to push only the newer file to each side.

If single files are updated on both sides you need a content-dependent
way of merging them, which is out of the scope of rsync.  Have a look
at the Unison tool.

--
Martin

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



Re: rsync and missing files?

2002-04-25 Thread Jos Backus

On Thu, Apr 25, 2002 at 12:18:59PM -0500, Dave Dykstra wrote:
 The code is currently doing a continue after that error, not an exit, so
 it should be continuing on to do the rest of the files before it exits.
 However, an error message is printed at exit time.

It sounds like the files rsync can't find are the last files it tried to
operate on before exiting; hence, no bug.

-- 
Jos Backus _/  _/_/_/Santa Clara, CA
  _/  _/   _/
 _/  _/_/_/ 
_/  _/  _/_/
[EMAIL PROTECTED] _/_/   _/_/_/use Std::Disclaimer;

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



Re: rsync raising an IO error for an excluded file

2002-04-25 Thread Martin Pool

On 25 Apr 2002, Dave Dykstra [EMAIL PROTECTED] wrote:

  Shouldn't/couldn't the ignore silently if excluded be specified less
  strictly to cover the above permission denied error as well?
 
 I think you're right.  Martin Pool, what do you think?  Martin Bene, could
 you please try coding and testing a patch that will do what you want?

Yes, that sounds reasonable to me.

--
Martin

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



Re: 4.4BSD chflags support for rsync

2002-04-25 Thread Rolf Grossmann

Hi Dave,

on Thu, 25 Apr 2002 15:52:56 -0500 Dave Dykstra wrote 
concerning Re: 4.4BSD chflags support for rsync something like this:

 I think the --flags patch is probably fine, except that that the short
 description should at least say preserve file flags instead of just
 preserve flags since most people wouldn't know what flags means.

Sure, changed that (found 3 occurrences).

However, I just recently found that I missed a case where I need to clear
change flags: when (hard)linking to a file, that file may not have flags
that prevent modification. Unfortunately, I didn't have time to look into
that issue, yet.

I also noticed, that you've been changing quite a few bits lately. E.g.
there are rules to build texinfo documentation in the Makefile (but no
texinfo files) and there is SGML documentation, but no rules for
formatting. So I decided to wait some more before updating the patch
to the current release (probably updating the new documentation then).
So if you'd rather wait for me to update the patch (which is against 2.5.2),
I'll probably get back to you either after the next release or in a
week or two. Of course I'll be happy if you'll add the patch anyway ;)

 I don't like --ignore-existing, though.  What's the point of using rsync
 if you're not updating existing files?

It's not my work. I was only saying that by building the manpage,
the documentation for --ignore-existing also showed up. So unless it
was explicitly removed for the release, it was simply forgotten to
rebuild the manpage after the change.

Bye, Rolf

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



Re: symmetric mirroring (was testing)

2002-04-25 Thread Rich Winkel

Hi Martin,

I guess I need to be more specific.  I have a unix user who has unix
machines at home and at work.  He wants local access to the same set of
files whether he's at home or at work.

 If each side updates a non-overlapping set of files you can do this
 using --update to push only the newer file to each side.

That much I figured out, but a problem arises when files are created
or deleted.  If a file on A has no counterpart on B, should it be
deleted or copied over to B?  My primitive idea is just to compare
the date stamp (or inode modification time) of the file with the
time of the last rsync, and either copy it over if it's newer, or
delete it.  Not very pretty, I know, but it would suffice for his
purposes, and it would be easy to implement with an option like
--symmetric=date_stamp_file
where date_stamp_file is touched every time rsync runs.
Ideally this would cause rsync to run in a duplex mode where
files could be copied in either direction depending on which is
newer.  But that part sounds like a pretty major project.

 If single files are updated on both sides you need a content-dependent
 way of merging them, which is out of the scope of rsync.  Have a look
 at the Unison tool.

Thanks for the tip, it sounds interesting.  I'll check it out!

Rich


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



limiting metadata updates

2002-04-25 Thread Phil Howard

Is there a way to specify to rsync that metadata should NOT be updated
unless the object was created, or the contents of a file was modified.

Specifically, what I want to do is use rsync to install a file tree
of a few changes (a package being replicated to multiple machines after
it has been compiled).  The problem is that the file tree created to
hold the files from the install does not have the correct meta data in
the directories unless the package is installing that directory.  For
example /usr/bin has permission 0755 normally, but I find that same
directory within the directory derived from building the package does
not have 0755.  Sometimes directories are owned or have a group other
than root for a reason.  When I replicate these few files over to the
target systems, I want the metadata on the target systems to stay as it
was, and not be updated by the package (except of course for new ones
created by the package).

Any way to do this in rsync?

I'd prefer not to have to reproduce that metadata back into the package
tree being built (this would still cause the metadata to change, though
it would not be changed differently).  The reason is that it may be the
case at some point that the metadata is not universally the same across
different machines and needs to be retained on each machine the way it
was set up originally.

I can do this by staging the tree in /tmp first and running a complex
script to apply the updates.  I would prefer to find something cleaner
that already does it right, if possible.

-- 
-
| Phil Howard - KA9WGN |   Dallas   | http://linuxhomepage.com/ |
| [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/ |
-

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