On Tue, 18 Jul 2023 10:39:45 +0200, "Carlos E. R." <robin.listas@telefonica.net> wrote:
On 2023-07-18 03:06, Robert Webb via openSUSE Users wrote:
On Mon, 17 Jul 2023 13:24:23 +0200, "jdd@dodin.org" <jdd@dodin.org> wrote:
Le 17/07/2023 à 13:10, Andrei Borzenkov a écrit :
On Mon, Jul 17, 2023 at 1:59 PM jdd@dodin.org <jdd@dodin.org> wrote: ...
jdd@localhost:~> rsync -rvv --delete -e ssh --exclude .dtrash
...
So, the file 'Fichier texte.txt' is "transferred" (no data) because its modification time in the destination does not match that in the source. And that is because you used the '-r' (--recursive) option instead of '-a' (--archive, equivalent to -rlptgoD), which everybody else uses (already suggested by Masaru). You got that from stackexchange?
I must be low on morning tea. Why...?
The critical difference between the rsync '-a' and '-r' options is that '-a' implies the '-t' (--times) option to preserve modification times, so the mtime on the destination file is set to be the same as the source file. Whereas with '-r', the time is set to the current time ("transfer time"), like using 'cp' without the '-p' or other time-preserving option. So, after the first 'rsync -r ...', the source and destination files (ones that were transferred) have the same contents, but different modification times. Then, at the beginning of the second 'rsync -r' run, when it is deciding which files may need updating, it uses the difference in mod times, or a difference in file size to identify non-identical files (rsync's 'quick check' algorithm). So the file is "transferred" again. I don't know just what "transferred" means. I guess that rsync compares hashes taken of the contents of the source and destination files, and then with these identical files just quits there, except for setting attributes on the destination. -- Robert Webb