On 6/12/26 12:20, Roger Heflin wrote:
You might test by using this:
touch -r <filetocopytimesfrom> <filetosettimeon>
And see if that properly sets the 2nd file to have the same times as
the first (-r file).
At the start:
$ ls -l /data/Pictures/2026/20261128 # source (kvm guest)
total 7592
-rw-r--r-- 1 eyal eyal 2627530 Nov 28 17:07 20261128_170658.jpg
-rw-r--r-- 1 eyal eyal 5142669 Nov 28 17:09 20261128_170912.jpg
$ ls -l /data2/Pictures/2026/20261128 # target (kvm host)
total 7592
-rw-r--r-- 1 eyal eyal 2627530 Dec 6 10:45 20261128_170658.jpg
-rw-r--r-- 1 eyal eyal 5142669 Dec 6 10:45 20261128_170912.jpg
# set times
$ touch -r /data/Pictures/2026/20261128/20261128_170658.jpg
/data2/Pictures/2026/20261128/20261128_170658.jpg
## after 'touch'
$ ls -l /data2/Pictures/2026/20261128
total 7592
-rw-r--r-- 1 eyal eyal 2627530 Nov 28 17:07 20261128_170658.jpg
-rw-r--r-- 1 eyal eyal 5142669 Dec 6 10:45 20261128_170912.jpg
Check locally on the host:
$ ls -l /data2/Pictures/2026/20261128/
total 7592
-rw-r--r-- 1 eyal eyal 2627530 Dec 6 10:45 20261128_170658.jpg
-rw-r--r-- 1 eyal eyal 5142669 Dec 6 10:45 20261128_170912.jpg
Check again on the guest:
$ ls -l /data2/Pictures/2026/20261128
total 7592
-rw-r--r-- 1 eyal eyal 2627530 Nov 28 17:07 20261128_170658.jpg
-rw-r--r-- 1 eyal eyal 5142669 Dec 6 10:45 20261128_170912.jpg
Then a few minutes later on the guest:
$ ls -l /data2/Pictures/2026/20261128
total 7592
-rw-r--r-- 1 eyal eyal 2627530 Dec 6 10:45 20261128_170658.jpg
-rw-r--r-- 1 eyal eyal 5142669 Dec 6 10:45 20261128_170912.jpg
If it works locally but not on nfs then the issue is either how the
underlying disk that is nfs exported is mounted on the server, or the
way the nfs export is done, and/or how the nfs disk is mounted on the
client.
== On the host:
/etc/fstab
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /data2 ext4 noatime 1 3
/etc/exports # .3.0 is the local net, .122.0 is the kvm link
/data2 192.168.3.0/24(rw,async,no_root_squash)
/data2 192.168.122.0/24(rw,async,no_root_squash)
##### maybe a different syntax needed for the two rules? #####
$ mount|grep data2
/dev/sda1 on /data2 type ext4 (rw,noatime)
== On the guest:
/etc/fstabclient
files:/data2 /data2 nfs soft 0 0
$ mount|grep data2
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)
On Sat, Dec 5, 2026 at 5:10 PM <[email protected]> wrote:
On 5/12/26 18:40, [email protected] wrote:
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?
[trimmed]
I will let the situation settle and check again much later.
Left it alone overnight, timestamps are still wrong.
Clarifying the situation:
The whole situation is run on a kvm client. The source (/data) is
local, the target (/data2) is nfs mounted from the host.
user/group IDs are identical.
When I run a similar command on the host the timestamps are preserved.
I run this command as part of my backup. The problem started showing in
20251001, earlier files have correct timestamp.
It seems that each backup (rsync) is setting the timestamp to the backup time.
Repeatedly. To all files starting with 20251001.
--
Eyal at Home ([email protected])
--
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