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?