Storm season is back, bringing with it the potential for significant weather events. If you have clients in areas prone to infrastructure disruption, visit the Disaster Recovery Resources guide for preparedness information. Datto recommends performing proactive disaster recovery testing to mitigate potential downtime. See our articles about the importance of disaster recovery testing and Preparing For A Cloud Virtualization Test: Policies, Procedures, And Partner Responsibilities to learn more. For live updates, follow @datto on Twitter.

Using Robocopy to copy files from an iSCSI share

Follow

Scope

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.

Procedure

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

Examples

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.

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?

0 out of 1 found this helpful

You must sign in before voting on this article.

Calling all Partners! We want to hear your feedback! Please participate in this quick survey and help us build a better, more-relevant Knowledge Base!

Want to talk about it? Head on over to our Community Forum!