Re: rsync *Still* Copying All Files?

2002-01-02 Thread Martin Pool

On 20 Dec 2001, Mack, Daemian [EMAIL PROTECTED] wrote:
  The question is, why does it work?  Are you indeed copying 
  between two NTFS
  filesystems, with rsync running under Windows  cygwin on 
  both sides?  I
  would have thought that would result in matching timestamps 
  granularity on
  both sides so rsync would always end up comparing the same values.
 
 Now that you've jogged my memory, I remember coming across a Knowledge Base
 article around a year ago that discussed this filesystem timestamp
 granularity.  I can't recall the reason for it, or the set of circumstances
 under which it's an issue, but maybe this article touches on the issue long
 enough to be of relevance:
 
   http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q127830
 
 My hunch is that this is happening because I'm dealing with NTFS5 on Win2K
 and NTFS4 on NT4.

I think there are some NT APIs that only return time in 2sec
resolution.  Possibly Cygwin is using them?  (Why would it, though?)

-- 
Martin 

The daffodils are coming. Are you?
  linux.conf.au, February 2002, Brisbane, Australia
--- http://www.linux.org.au/conf




Re: rsync *Still* Copying All Files?

2001-12-19 Thread Dave Dykstra

On Wed, Dec 19, 2001 at 04:36:21PM -0500, Mack, Daemian wrote:
 Hi, all.  This is my first post to the list, so please forgive me if this is
 an old issue.  I scoured the mailing list archives by hand and could find no
 mention of it, and the official FAQ-o-matic mentions it, but doesn't offer a
 fix that works for me.
 
 I've set up an rsync daemon on Windows NT4 by installing the latest cygwin.
 Using the cygwin1.dll and rsync.exe, I'm able to connect successfully from
 other NT4 and Windows 2000 machines.  I can get the rsync server to let me
 pull files over the net to my local data to synchronize.
 
 However, I've noticed that on the clients, *all* files are being copied
 over.  Here's the command line I'm issuing:
 
 C:\temprsync --verbose  --progress --stats --compress --recursive --times
 10.8.1.57::nmap /cygdrive/c/temp/nmap
 
 I'm using a source distribution of nmap just to test with.  When I started
 noticing this error, I placed a 37MB file inside the rsyncable nmap area to
 emphasize the amount of time spent syncing.  The progress switch allows me
 to watch a realtime progress counter as the files are processed.  It takes
 several minutes for that 37MB file to come over, and the stats at the end
 hold up the theory that ~40MB of data has been transferred.  While
 troubleshooting, I added the times switch to see if preserving timestamps on
 the files would solve anything; it didn't.
 
 I've made sure both client and server are set to the same time.  The only
 thing I've noticed that could be a possible clue is that the files are
 different *sizes* on each disk (because of NTFS cluster size hijinks, etc.),
 so, just to be paranoid, I tried using checksum to find file diffs.  Again,
 no dice.  No matter what I try, rsyncing causes all files to be copied over
 the wire onto the local box.
 
 I can't figure this out.  I don't know if rsync-for-cygwin's algorithm for
 determining file differences is lacking somehow, or if something about this
 data is tricking rsync into thinking changes have occurred, or if I'm just
 doing something dumb.  
 
 Any ideas?

Try --modify-window 2.  I'm not sure that will work because it sounds
like you're copying between two filesystem types that are the same, but the
option was added to copy between PC filesystems that have a timestamp
granularity of 2 seconds and Unix filesystems that have a granularity of 1
second.

- Dave Dykstra




RE: rsync *Still* Copying All Files?

2001-12-19 Thread Mack, Daemian

 Try --modify-window 2.  I'm not sure that will work because 
 it sounds
 like you're copying between two filesystem types that are the 
 same, but the
 option was added to copy between PC filesystems that have a timestamp
 granularity of 2 seconds and Unix filesystems that have a 
 granularity of 1
 second.

W!  That did it!

Wouldn't you know it'd be the one switch I didn't think to try?

Thanks!


Daemian Mack




Re: rsync *Still* Copying All Files?

2001-12-19 Thread Dave Dykstra

On Wed, Dec 19, 2001 at 05:03:51PM -0500, Mack, Daemian wrote:
  Try --modify-window 2.  I'm not sure that will work because 
  it sounds
  like you're copying between two filesystem types that are the 
  same, but the
  option was added to copy between PC filesystems that have a timestamp
  granularity of 2 seconds and Unix filesystems that have a 
  granularity of 1
  second.
 
 W!  That did it!
 
 Wouldn't you know it'd be the one switch I didn't think to try?

The question is, why does it work?  Are you indeed copying between two NTFS
filesystems, with rsync running under Windows  cygwin on both sides?  I
would have thought that would result in matching timestamps granularity on
both sides so rsync would always end up comparing the same values.

- Dave Dykstra