I use rsync to bring files from multiple servers to a "master copy". Sometimes the same file has different content in different sources. What I want is to keep the last modified one. I wish rsync had something like --time-only (analogous to --size-only) so it could simply sync based on last modified time. Without something like that, rsync will keep overwriting the same files over and over again when syncing from different sources (if the size or checksum doesn't match).

Are there any better ways to do this kind of synchronization?

link|improve this question
feedback

migrated from stackoverflow.com Sep 12 '11 at 11:42

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 2 down vote accepted

Sounds like what you want it is rsync -u -- "skip files that are newer on the receiver".

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.