Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

rsync from macOS over SMB doesn't preserve modification time

Featured Replies

rsync -a from macOS (15.5) to unRAID (7.1.4) over SMB resets modification time (as indicated by stat -f "%Sm") to current time.

The share is array-only and the disks are XFS.

Happens both with the pre-installed rsync v2.6.9 and later v3.4.1.

Calling rsync with the --fsync option solves the problem.

Posting here to see if I'm the only one affected before filing a bug report.

Solved by bmartino1

  • Community Expert
  • Solution

Calling rsync form apple or rsync form unraid terminal?

I assume a smb connection on the Apple device. as it’s not really a Unraid/XFS bug, it’s mostly about how macOS implements SMB + rsync

Here’s what’s going on:

  • On macOS, rsync doesn’t talk to the filesystem directly when you’re writing to a remote SMB share — it’s writing through Apple’s SMB client.

  • Apple’s SMB client is very aggressive with write caching and metadata updates. By default, when rsync finishes copying a file, the mtime (modification time) isn’t guaranteed to be flushed down to disk correctly.

  • That’s why you see it reset to “now” on the Unraid side instead of being preserved.

When you add --fsync, rsync tells the OS to explicitly flush each file’s data and metadata to disk before moving on. That forces macOS to commit the proper mtime, so you see the expected behavior in Unraid.

Why this is Apple-specific

  • On Linux rsync over SMB/NFS/SSH, you generally don’t need --fsync.

  • On macOS, Apple’s SMB stack often ignores utimes()/futimens() metadata updates until the file is fully closed and flushed. Without fsync, the SMB server (Unraid in this case) just gets “best-effort” timestamps.

  • That’s why it doesn’t matter whether you use rsync 2.6.9 or 3.4.1 — the problem is lower in the stack (SMB + APFS caching behavior).

some potential workarounds...

If you want stable results without always remembering --fsync:

rsync -a --fsync source/ /Volumes/UnraidShare/dest/

Force rsync to go over SSH instead of SMB

  • Mount your Unraid share via SSH (or just run rsync directly over ssh://).

  • That way rsync is talking directly to Unraid’s filesystem, bypassing Apple’s SMB client.

rsync -a -e ssh source/ user@unraid:/mnt/user/share/

Use --inplace in some workflows (can help with timestamp consistency if files are being updated instead of replaced).

Check your Unraid SMB settings

Edited by bmartino1

  • 1 month later...
  • Author

I just saw this reply. Great explanation, thanks!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.