SMB shares for Robocopy

I am not an expert when it comes to SMB and I currently have an issue that drives me insane.

My goal: Copy some files with robocopy /mir to my TrueNAS SMB share. This should be done daily. TrueNAS should then create a daily snapshot.

My problem:
No matter what I try in regards to dataset or share settings, I always get this error in robocopy:

ERROR 50 (0x00000032) Accessing Destination Directory \\truenas\somehtingsomething\
The request is not supported.

How is that TrueNAS related you might ask. Well, I don’t have this issue when using the same robocopy command to a Windows SMB share.

I tried everything, ACL, no ACL.
Any ideas?

robocopy command:
robocopy "D:something" "\\blabla\blabla\" /E /PURGE /R:2 /W:5
or
robocopy "D:something" "\\blabla\blabla\" /E /MIR /R:2 /W:5
or
robocopy "D:something" "\\blabla\blabla\" /E /MIR /R:2 /W:5 /COPY:DT /DCOPY:DT

Did you mistype that one at the end? It should be DCOPY, not COPYD.

I would try again with just this, note the dropped D at the end:
robocopy "D:something" "\\blabla\blabla\" /E /MIR /R:2 /W:5 /COPY:DT /DCOPY:T

Ups, that is just a typo, edited it.

Windows drives me insane!

So I just found out that there are basically two types of terminal, one that opens command pro and one that opens powershell.

My command does not even get executed in command pro, since it does not recognize my " " for paths.

robocopy "D:\source" "\\truenas\dest\" /MIR /R:2 /W:5 /TEE /COPY:DT /LOG:"C:\Users\username\Desktop\robolog.txt" /XD "D:\something\pleasenotthisfolder" /XD "D:\pleasenotthisfoldereither"

gives me this error:

ERROR : Invalid Parameter #3 : "something\pleasenotthisfolder"

Which it does not for powershell. Are you kidding me? :rage:

Sorry for the rant guys, I have a pretty bad headache and I think I will just go home now. Sorry if don’t answer for a few days.

1 Like

I am not familiar with that one, is it new in Windows 11? I typically just run cmd.

It’s okay, we’ll probably mostly be here when you get back.

1 Like

My headache is gone. Not sure if my hatred for Windows is gone yet :wink:

Sorry, I seem to just have cut off the window.
The whole title of the windows reads “Command Promt”.
I just cut off mt at the end :grin:

Ok, back in action.

PowerShell instead of CMD is fine by me. Still, I get the error

ERROR 50 (0x00000032) Accessing Destination Directory \truenas\somehtingsomething\ The request is not supported.

when using this command:

robocopy “D:something” "\10.0.40.8\destination" /E /MIR /DCOPY:D /COPY:DT /R:2 /W:5 /TEE /LOG:“C:\Users\username\Desktop\backup.txt” /XD “D:\pleasenot” /XD “D:\please not”

Same happens if I add it as a network drive and assign Z: to it.

Any ideas what the problem could be?

Update: Turning off alternate data streams and SMB2/3 locks and restarting SMB service solved the issue!

1 Like

You shouldn’t be required to disable alternate data streams to have this work. Note to future people looking at this thread:

Disabling alternate data stream support means that the robocopy job will strip ADS from your data and should not be used for data migration because you’re no longer preserving all data.

1 Like

I’m using cho eazy copy (i know stupid name) which is a gui for robocopy and i didn’t have to disable anything to get it to work

Not sure about the defaults it used when creating an Dataset for SMB.
For the dataset it set
ACL Type: SMB/NFS4
ACL Mode: Restricted

For the SMB share itself, it I think it set it to “default share parameters”.
I set it to “No preset” and then set these:
Enable ACL
Access Based Share Enumeration
Host allow a single IP
Enable shadow copies
Disabled Alternate Data Streams

As soon as I reenable ADS, the problem reappears. Does not really matter for me, since I do not care about ADS. This is only a second backup for a long term archival that hopefully never gets used.