Problem with rsync recent file logic ?

Olivier Thauvin nanardon at
Thu Nov 15 11:17:31 GMT 2007

Le jeudi 15 novembre 2007, Maxim Veksler a écrit :
> Hello,
> I have 2 servers I'm synchronizing using rsync, I have a situation where I
> :
> 1. rsync from rnd-dev2 to rnd-dev1
> 2. change the rsynched file on rnd-dev1
> 3. rsync from rnd-dev2 to rnd-dev1 again
> 4. File gets overridden on rnd-dev1 over though it has newer change
> time then file on rnd-dev2.

I don't see any issue here.

> #### Note that file got rsynced from rnd-dev2 and had it's change date
> updated to older time (of rnd-dev2). As well as the content that got
> replaced by the out dated version on rnd-dev2. Bummer...
> What am I missing to get it do the right thing? I would expect rsync
> when called the second time from rnd-dev2 to recognize that the file
> on rnd-dev1 is newer and to NOT replaced it.

Rsync has never check date recency by default, if time or size differ, rsync 
synchronize the file.

Found in man page:

        -u, --update                skip files that are newer on the receiver

which is probably what you need in this case.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url :

More information about the rsync mailing list