Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

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

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

1 Answer 1

up vote 2 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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