rsync-ing from two locations with same filenames (at different
versions)
Mojca Miklavec
mojca.miklavec.lists at gmail.com
Fri Feb 1 01:06:23 GMT 2008
On Jan 30, 2008 2:38 PM, Matt McCutchen wrote:
> On Wed, 2008-01-30 at 09:48 +0100, Mojca Miklavec wrote:
> > Neither helps. Even if I have a file of differest size and with a
> > different timestamp, and even if I add --checksum or --ignore-times,
> > the old file in dest won't be modified (overwritten by a newer file).
>
> I can't reproduce the problem. I ran the script in your original
> message, except I changed "b2" to "b22" and waited a few seconds before
> running that line so the file would get a later mtime. Both rsync 2.6.9
> and the latest development rsync correctly replaced b.txt with the
> version from new/ on the second run. Am I missing something?
I don't know. Somtimes it works and sometimes not (but mostly not as a
rule of thumb). Even if I wait for a few minutes inbetween, the new
file won't be chosen.
> rsync --version
rsync version 2.6.3 protocol version 28
That might be old, but that was the default that came with fink on Mac
OS X (if the error has been fixed in the meantime, I will upgrade).
> ll new/dir1/
skupno 4,0K
-rw-r--r-- 1 mojca wheel 6 feb 1 02:00 b.txt
> ll full/dir1/
skupno 8,0K
-rw-r--r-- 1 mojca wheel 2 jan 30 09:36 a.txt
-rw-r--r-- 1 mojca wheel 4 feb 1 01:52 b.txt
> cat full/dir1/b.txt
b12
> cat new/dir1/b.txt
b2222
> rsync -rpztlv --delete --checksum new/dir1/ new/dir2/ full/dir1/ full/dir2/ dest
building file list ... done
./
sent 261 bytes received 20 bytes 562.00 bytes/sec
total size is 24 speedup is 0.09
> cat dest/b.txt
b12
Thanks a lot,
Mojca
More information about the rsync
mailing list