Using Robocopy to copy files from an iSCSI share



When copying files from an iSCSI share to Windows, you can lose the file permissions. To prevent this, we recommend that you use the Microsoft tool, Robocopy, to perform this task.

This article provides a procedure to use Robocopy to copy files from an iSCSI share to a folder on Windows. These instructions also apply to iSCSI file restores. These instructions assume that you have already mounted the iSCSI volume on the target Windows machine. If not, follow the instructions in the article Mounting An iSCSI Share In Windows.


To obtain Robocopy on machines running Windows Vista or older, download the Windows Server 2003 Resource Kit Tools. For newer versions of Windows, Robocopy is included with your OS. See the article Robocopy and a Few Examples for detailed usage information.

To copy files from an iSCSI share on a Datto NAS to a Windows machine, use the commands below.

On the protected machine, bring up an elevated command prompt.

Customize the following command to apply to your circumstances:

robocopy [source] [destination] /mir /Z /W:5 /fft /R:3 /secfix /copyall


Be extremely careful, as the /MIR flag will cause Robocopy to overwrite and delete data in the destination and its subdirectories. Use the colons (::) in front while typing the command, and remove them only when you are ready to execute the robocopy. For help with using Robocopy, see Microsoft's how-to article or contact Microsoft Support (external links).

This example copies the contents of the F: drive to the D: drive.

robocopy F: D: /mir /Z /W:5 /fft /R:3 /secfix /copyall

This example copies from one subdirectory to another subdirectory.

robocopy F:\Data D:\Data /mir /Z /W:5 /fft /R:3 /secfix /copyall

This example will copy a specific file or files from one directory to another. Note: WildCards can be used.

robocopy F:\Data D:\Data *.txt /Z /W:3 /fft /r:3 /v

The following list explains the meaning of each flag:

/MIR Mirrors a directory tree.

/Z Resumes transfer if interrupted during a large file copy.

/W:3 Waits three seconds before a retry.

/fft Assumes FAT file times, which has two-second precision, and is very close to real time.

/r:3 Allows for three re-tries before a file is dropped from the list.

/v Allows for verbose logging and output. This command is optional.

Was this article helpful?

2 out of 6 found this helpful

You must sign in before voting on this article.

Want to talk about it? Have a feature request?

Head on over to our Datto Community Forum or the Datto Community Online.

For more Business Management resources, see the Datto RMM Online Help and the Autotask PSA Online Help .

Still have questions? Get live help.

Datto Homepage