Is it possible to sync files via rsync
and let rsync
only compare mtime informations?
Or is there another tool for this job?
That means that such a tool only copies src to destination if the src is newer than the destination. Comparable to GNU cp --update
– but also over ssh …
Best Answer
Yes, it is possible.
rsync
also has--update
, but with itrsync
still uses its delta-transfer algorithm in case the src is newer.rsync
provides the--whole-file
option to disable this algorithm. Thus,should have the effect that src files are only copied to the destination when they are newer. And only mtime checks should be used for this.
There are several reasons to avoid the delta-transfer algorithm for special use cases. Mainly performance reasons and perhaps transfer volume in very special cases.
To quote from the man-page:
The case about networked filesystems should be the most common one.
Also, since the delta-transfer algorithm is a heuristic you can imagine files where the algorithm ends up transferring the whole file and just adds (time and space) overhead.