0

I have a mounted a folder from my NAS with mount -t smbfs -o -d=755,-f=755 //nas.local/backup ~/backup.

I now try to rsync a local folder to this distant folder with something like rsync --modify-window=30 -irvt --info=progress2 --delete-after test-dir ~/backup.

I've tried a lot of rsync options, but I'm always getting >f..t....... on all the files, so I always have speedup is 1.00 even if I run the same rsync multiple times in the row, without changing anything in the source folder. I don't have this issue when running the rsync between 2 local folders.

What am I doing wrong here ?

Thanks,

2
  • Is the filesystem on the NAS something that warrants the use of --modify-window, e.g. FAT? Commented Dec 19, 2023 at 7:56
  • I use BTRFS on my NAS. I tried the --modify-window to see if it could help with my problem, but it didn't :/ Commented Dec 19, 2023 at 11:03

1 Answer 1

1

If your NAS allows ssh login you will generally get a significantly more efficient file transfer if you ignore the SMB share and have rsync talk to the NAS directly:

rsync -rtiv --info=progress2 --delete test-dir remoteUser@nas:~/backup

Otherwise, remove the --modify-window=30 and try the copy again:

rsync -rtiv --info=progress2 --delete test-dir ~/backup

For either suggestion you should to ensure the local and remote systems use the same time source so that they have the same date/time. NTP can be a good choice for Internet-connected systems.

If you are writing to a FAT filesystem you will need to provide --modify-window=1 to overcome the limitation of having only 2-second granularity in the filesystem metadata. (I know of no system where timestamps are accurate only to the nearest minute; MacOS APFS itself is accurate to the nanosecond. It doesn't mean there aren't any, but requiring --modify-window=30 seems exceedingly unlikely unless you're trying to work around a completely different issue.)

2
  • Thank you for your answer ! Already tried without the modify-window parameter, didn't help. I however tried rsync directly through ssh and it indeed worked, thanks ! No sure it really solves the issue raised here, but it suits me as I can now do my backup ! Thanks ! Commented Dec 19, 2023 at 22:04
  • @RobinFrcd happy to try and help resolve your Samba/time issue. But to do that I would need to see a few examples of problematic files (start with ls -l for source and corresponding destination). Put this into your question, formatted with the {} button Commented Dec 19, 2023 at 22:26

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.