Issue mirroring Windows Server share to Truenas share

tentpiglet

Cadet
Joined
Aug 21, 2022
Messages
5
I'm having an issue mirroring a Windows Server share to a Truenas (13.0-U2) share.

I am using robocopy to mirror the folder:

robocopy D:\SRC \\TRUENAS\DEST *.* /W:0 /R:0 /SL /FFT /XJ /XJD /XJF /NDL /MIR /ETA /COPY:DATS /DCOPY:DAT

running this command, the copy works the first time as expected. Subsequent times, rather than copying what has changed, everything is copied again, as robocopy indicates all the files are "Modified"

Googling this error, several suggestions were made to solve the 'problem'. First use /FFT to deal with potential timestamp issues. Second, use /A-:A to reset the archive flag on the source files after the copy is complete.

Did both of these. No difference.

What did work though, was removing the 'S' (copy security) flag on the /COPY option (e.g. change it from /COPY:DATS to /COPY:DAT ... removing that attribute, the subsequent copies do not see every file as 'modified'.

Obvious this is less than ideal, since I do not want to have to reset the security manually on thousands of files/directories.

Examining the security on the files from src and dst side by side, they appear identical. the owner is identical as well.

I performed a similar test where the dest was a share on another windows server, and the copy performs as expected without the files being reported as "modified" on subsequent runs. This is the expected behavior. The problem appears solely when attempting to copy to the TrueNAS share.

Would anyone have any ideas why copying security attributes to a TrueNAS SMB share would make Robocopy believe every file has been 'modified'? And, if so, how to correct the behavior?

The TrueNAS server is configured to join my AD domain and I'm attempting this copy as an domain admin user with full control to the directory tree I'm attempting to mirror.

junk.png


Windows server is set up w/ inheritable permissions on all subfolders/files. Have verified permissions are identical on subfiles/folders. Permissions copy correctly to TrueNAS but every file is "modified" each time I re-run Robocopy unless I remote the "S" attribute from /COPY:
 
Top