I want to transfer changed and new files only, using
rsync on Ubuntu 14.04. I don't want to transfer everything, every time. I'm not worried about checking if the content of the files have actually changed. Similar posts exist, but I'm unsure because the documentation doesn't align with what is said in those posts.
The documentation in
This forces rsync to skip any files for which the destination file already exists and has a date later than the source file.
Edit: Found another (probably more official) documentation page. It says:
-u, --updateskip files that are newer on the receiver
I find these poorly worded. Firstly, the first one says "date". I assume it actually means "timestamp". Secondly, and more importantly, it seems to imply that a file in both source and destination with the same timestamp will be re-transferred. The documentation clearly says that it will only skip a file when the destination file has a newer (i.e., later) timestamp (
T_d) than the source file timestamp (
T_s), implying that it will transfer when the destination file is older than or equal to the source file: Skipping transfer if
T_d > T_s implies that it transfers when
T_d <= T_s.
This is an important question to me, because if you want to transfer all new and changed files from a source folder to a destination folder with as little work (network/io/cpu/time) as possible the update flag might just re-transfer everything every time.
Or maybe I'm missing something, or misunderstanding something?
(This post was rejected from stackoverflow.com due to off-topic. Adding it, and the answer, here in case it might help people in the future.)