Sample Header Ad - 728x90

Preserve timestamp with rsync on QNAP share from PI

0 votes
0 answers
171 views
I have a Rasberry PI where I have mounted a QNAP 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 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 preserves timestamp - but the issue is that the timestamp of the file in the filtered folder does not get preserved from the source. It gets the current time as the timestamp. This means that rsync will copy all files each time because the timestamp does not match. I can use --size-only to skip time check, but that has its negative sides as well. Why is the timestamp not preserved? Have I mounted the folder incorrectly?
Asked by Ziggy000 (101 rep)
Sep 3, 2022, 07:19 PM
Last activity: Sep 4, 2022, 06:17 AM