How to move files to a NetApp CIFS server using Robocopy to retain Windows ACLs
Applies to
- ONTAP 9
- Data ONTAP 7-Mode
- Microsoft Windows
- CIFS/SMB
Description
Copy files from a file server to a NetApp CIFS server using Robocopy to retain Windows permissions.
Procedure
- 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
- The copy option "
- 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