Hello, I have a question about how/why rsync updates modification times, which I haven’t been able to find an answer to.
I have two locally connected storage devices running TrueNAS Core: one is new and empty, while the other is filled with files. When I run the following rsync command: rsync -avPh --itemize-changes --stats "${@}" to transfer files from the full storage to the empty one, the modification times of the transferred files are updated to the time of transfer. I understand that using rsync to transfer to an empty storage may not offer any real advantage, and that the modification times are updated because rsync "touches" the files. However, I would prefer for rsync not to update the modification times, though I gather this might not be possible. For context, the --itemize-changes output during the initial transfer looks like this: >f++++++++++ Now, if I wait for a minute and then run a dry run with the same command on the files I just transferred, the output changes to: >f..t....... If I actually rerun the command, rsync updates the modification times to the current time. This behavior repeats endlessly each time I run the command. Interestingly, if I manually "drag and drop" the files to the empty storage, the modification times remain the same as the original files, which is the outcome I prefer. Moreover, if I run the same rsync command (rsync -avPh --itemize-changes --stats "${@}") on the files that I dragged and dropped, rsync doesn’t transfer or update any file, and the --itemize-changes output looks like this: .f I’m puzzled as to why rsync behaves differently for files initially transferred using rsync versus those transferred via drag and drop. Could this behavior be more related to TrueNAS rather than rsync? Any clarification would be greatly appreciated. Thanks, Bleakley
-- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html