The gsutil rsync documentation describes two options which sound identical:
Option |
Description |
-i |
This forces rsync to skip any files which exist on the destination and have a modified time that is newer than the source file. (If an existing destination file has a modification time equal to the source file's, it will be updated if the sizes are different.) |
-u |
When a file/object is present in both the source and destination, if mtime is available for both, do not perform the copy if the destination mtime is newer. |
Although they use different terms, mtime and modification time, still it seems to be the same. At least I have not found any info on the difference. Both options effectively state that the file will not be copied (skipped) if the destination file is newer.
However, there must be some difference. I can't assume that the product team kept two identical options by mistake.
What is the difference in effect of these two options?
The only possible difference may be in the case of equal modification times of the source and destination, as described in the parentheses. In this case, the documentation might be improved to explicitly link the two options and point out the only difference. At least the same terms should be used to avoid confusion.
I've asked a similar question on StackOverflow earlier, but it is not specific enough (leaning to the difference between terms “mtime” and “modification time”), hence the answer is not complete. Now I'm asking here because the question is not about programming, and the question is specific now.