On 5/12/26 18:45, Luna Jernberg wrote:
By default, rsync does not copy recursively, preserve timestamps,
preserve non-default permissions, etc.
There are individual options for all of these things, but the option
-a, which is short for archive mode, sums up many of these (-rlptgoD)
and is best for producing the most exact copy.
(-A (preserve ACLs), -X (preserve extended attributes), and -H
(preserve hardlinks) may also be desired on rare occasions.)
Note that if you are copying files not owned by you, preserving file
ownership only works if you are root at the destination. If you are
copying between systems on different authentication infrastructures,
and the user/group does not exist at the destination, the numeric id
is used. If that numeric id corresponds to a different user/group, the
files will appear to be owned by that other user/group. If the
user/group does exist on the destination, and the numeric id is
different, the numeric id changes accordingly. The option --numeric
ids changes this behavior, but introduces some issues of its own, so
is not recommended by default.

Interesting but I do not see how it relates to the problem.
If you have a specific recommendation to add (or remove) an option then please 
highlight it and I will test.

Den lör 5 dec. 2026 kl 08:41 skrev <[email protected]>:

Maybe I need more sleep, but I cannot understand why the timestamps of copied 
files are set to 'now' rather than being copied from the source.
The options I use are what I always used, but maybe I am using it wrong?

The target is just a copy of the pictures, so I rarely look there. Now that I 
looked, I see that this has been the case for over a year.
BTW the target is nfs mounted.

Interestingly, rerun the rsync and it says the files are copied again.

[NOTE: see Important note at the end]

Here is  a small test run.
         $ rm -rf /data2/Pictures/2026/20261130/
         $ rsync -aHSKv --delete /data/Pictures/2026/20261130 
/data2/Pictures/2026/
sending incremental file list
20261130/
20261130/20261130_084030.jpg
20261130/20261130_180228.jpg
20261130/20261130_180230.jpg
20261130/20261130_180242.jpg
20261130/20261130_180244.jpg
20261130/20261130_180819.jpg
20261130/20261130_180911.jpg
20261130/20261130_180916.jpg
20261130/20261130_180919.jpg
20261130/20261130_181244.jpg
20261130/20261130_181258.jpg

sent 28,107,775 bytes  received 236 bytes  56,216,022.00 bytes/sec
total size is 28,100,211  speedup is 1.00

$ ls -la --full-time /data/Pictures/2026/20261130
total 27472
drwxr-xr-x  2 eyal eyal    4096 2026-12-04 15:06:35.890298384 +1100 .
drwxr-xr-x 76 eyal eyal    4096 2026-12-04 15:00:29.973600677 +1100 ..
-rw-r--r--  1 eyal eyal 2007029 2026-11-30 08:40:30.000000000 +1100 
20261130_084030.jpg
-rw-r--r--  1 eyal eyal 1571955 2026-11-30 18:02:29.000000000 +1100 
20261130_180228.jpg
-rw-r--r--  1 eyal eyal 1581208 2026-11-30 18:02:30.000000000 +1100 
20261130_180230.jpg
-rw-r--r--  1 eyal eyal 3600437 2026-11-30 18:02:42.000000000 +1100 
20261130_180242.jpg
-rw-r--r--  1 eyal eyal 3672636 2026-11-30 18:02:45.000000000 +1100 
20261130_180244.jpg
-rw-r--r--  1 eyal eyal 2811451 2026-11-30 18:08:20.000000000 +1100 
20261130_180819.jpg
-rw-r--r--  1 eyal eyal 3387836 2026-11-30 18:09:11.000000000 +1100 
20261130_180911.jpg
-rw-r--r--  1 eyal eyal 2981798 2026-11-30 18:09:16.000000000 +1100 
20261130_180916.jpg
-rw-r--r--  1 eyal eyal 3079861 2026-11-30 18:09:19.000000000 +1100 
20261130_180919.jpg
-rw-r--r--  1 eyal eyal 1708742 2026-11-30 18:12:44.000000000 +1100 
20261130_181244.jpg
-rw-r--r--  1 eyal eyal 1697258 2026-11-30 18:12:59.000000000 +1100 
20261130_181258.jpg

$ ls -la --full-time /data2/Pictures/2026/20261130
total 27432
drwxr-xr-x  2 eyal eyal    4096 2026-12-04 15:06:35.890298384 +1100 .
drwxr-xr-x 76 eyal eyal    4096 2026-12-05 17:47:30.756662578 +1100 ..
-rw-r--r--  1 eyal eyal 2007029 2026-12-05 17:48:12.355469717 +1100 
20261130_084030.jpg
-rw-r--r--  1 eyal eyal 1571955 2026-12-05 17:48:12.355469717 +1100 
20261130_180228.jpg
-rw-r--r--  1 eyal eyal 1581208 2026-12-05 17:48:12.355469717 +1100 
20261130_180230.jpg
-rw-r--r--  1 eyal eyal 3600437 2026-12-05 17:48:12.355469717 +1100 
20261130_180242.jpg
-rw-r--r--  1 eyal eyal 3672636 2026-12-05 17:48:12.355469717 +1100 
20261130_180244.jpg
-rw-r--r--  1 eyal eyal 2811451 2026-12-05 17:48:12.355469717 +1100 
20261130_180819.jpg
-rw-r--r--  1 eyal eyal 3387836 2026-12-05 17:48:12.355469717 +1100 
20261130_180911.jpg
-rw-r--r--  1 eyal eyal 2981798 2026-12-05 17:48:12.355469717 +1100 
20261130_180916.jpg
-rw-r--r--  1 eyal eyal 3079861 2026-12-05 17:48:12.355469717 +1100 
20261130_180919.jpg
-rw-r--r--  1 eyal eyal 1708742 2026-12-05 17:48:12.355469717 +1100 
20261130_181244.jpg
-rw-r--r--  1 eyal eyal 1697258 2026-12-05 17:48:12.355469717 +1100 
20261130_181258.jpg

'fstab' has:
          files:/data2                    /data2                  nfs     soft  
          0 0

'mount' shows:
files:/data2 on /data2 type nfs4 
(rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,soft,fatal_neterrors=none,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.122.14,local_lock=none,addr=192.168.3.7)

I am on fedora 44

$ rsync -V
rsync  version 3.5.2-g83d74e46  protocol version 33
Copyright (C) 1996-2026 by Andrew Tridgell, Wayne Davison, and others.
Web site: https://rsync.samba.org/
Capabilities:
      64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
      socketpairs, symlinks, symtimes, hardlinks, hardlink-specials,
      hardlink-symlinks, IPv6, atimes, batchfiles, inplace, append, ACLs,
      ACL-at, ACL-libacl-at, xattrs, optional secluded-args, iconv, prealloc,
      stop-at, no crtimes, IDN
Optimizations:
      SIMD-roll, no asm-roll, openssl-crypto, no asm-MD5
Checksum list:
      xxh128 xxh3 xxh64 (xxhash) md5 md4 sha1 none
Compress list:
      zstd lz4 zlibx zlib none
Daemon auth list:
      sha512 sha256 sha1 md5 md4

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.

dnf lists:
         Installed packages
         rsync.x86_64 3.5.2-2.fc44 updates

Important note:
I tested the copy command without the '--delete' option and the timestamps are 
now correct. I do not understand this.
I need the '--delete' option to take care of my moving files between 
directories.

False alarm, after a few minutes the timestamps were reverted to 'now' for most 
files. A few did not change...
Directories since 20251001 show the problem, so maybe something happened around 
that time?

I will let the situation settle and check again much later.

--
Eyal at Home ([email protected])

--
_______________________________________________
users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new


--
Eyal at Home ([email protected])
--
_______________________________________________
users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new

Reply via email to