Modified time is not preserved when running rsync towards mounted disks

Bug #1989223 reported by Stein Rune Risa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Raspbian
New
Undecided
Unassigned

Bug Description

Running Bullseye and I have a Rasberry PI 3B where I have mounted a NAS share.

This is how it is mounted in /etc/fstab on the PI:

192.168.1.130/Backup/Icloud /home/pi/IcloudPictures cifs username=admin,password=masked,uid=1000,gid=1000,vers=3.0

The mount works fine and I can read and write files.

I use rsync on the PI to extract some photos from one folder in the mount point to another folder in the mount point - e.g.:

rsync -av --include="*/" --include="*.jpg" --exclude="*" /home/pi/IcloudPictures/source/ /home/pi/IcloudPictures/filtered/

When I use -a it will implicit use -t which is supposed to preserve modified timestamp when copying file - but the issue is that the timestamp of the file in the destination folder does not get preserved from the source. It gets the current time as the timestamp. This causes rsync to copy all the files each times because source.mtime <> destination.mtime.

I have done som more testing:

* Running rsync on PI with source as a QNAP folder and destination as a QNAP folder: Modified time in destination gets reset to current time
* Running rsync on PI with source as a QNAP folder and destination as a local PI folder: Modified time in destination gets preserved
* Running rsync on PI with source as a local PI folder and destination as a QNAP folder : Modified time in destination gets reset to current time

So it seems that whenever the mounted disk is the destination - the modified timestamp gets reset when I run on PI.

* I also tested running rsync locally on the NAS (where the folders are located) itself and the modified time gets preserved just fine.
* I also tested running rsync in an Ubuntu instance on Windows Subsystem for Linux and mapping the folders in the same way as on the PI. The modified time in the destination folder gets preserved just fine - no issues there.

So there seems to be something strange going on when running rsync on the PI towards mounted disks.

description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.