Skip to main content
NetApp Knowledge Base

How to move files to a NetApp CIFS server using Robocopy to retain Windows ACLs

Last Updated:

Applies to

  • ONTAP 9
  • Data ONTAP 7-Mode
  • Microsoft Windows


Copy files from a file server to a NetApp CIFS server using Robocopy to retain Windows permissions.


  • Robocopy allows users to retain Windows file permissions when copying to a filer.
    • To copy files from a Windows server to a NetApp filer, use the following command syntax:
    • robocopy source destination /S /SEC
  • To retain the current ownership setting of the files being copied/moved, the CopyFlag "O" needs to be used with ROBOCOPY command. 
    • The copy option "/copyall" is equivalent to "/copy:DATSOU", so it includes the CopyFlag "O", but you can also use custom copy flags using the "/copy:" option, followed by the desired CopyFlags as described here.
    • robocopy /S /COPYALL
    • robocopy /S /COPY:DATSO
  • To keep the data in sync during a pilot phase of a migration, you can also put the following into a script and schedule it to run each hour on the Windows source server:

robocopy <sourcedir> <destinationdir> /copyall /mir /zb /r:1 /w:3



Sign in to view the entire content of this KB article.

New to NetApp?

Learn more about our award-winning Support

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.