Robocopy Command to Move Shares

I know that I am, typically, posting Mac and Security related stuff, but thought I would deal with something else that I am tasked with at work, Windows Servers.  More specifically, I am updating to a new file server and needed to move shares with permissions intact.  Below is a robocopy command that can be used to achieve just that:

robocopy (share) (location copying to) *.* /E /M /R:1 /W:5 /SEC

broken down this is:

(share)= the share you are moving mapped on the new server

(location copying to)= the directory path you are copying the old share to

*.*=copy everything

/E = copy subdirectories, including empty ones

/M = copy only files with the archive attribute and reset it (so you can do another incremental later; if needed)

/R:1 = tells it to retry one time if it cannot access the file

/W:5 = tells it to wait 5 seconds to retry

/SEC = copy the files with the security settings




***One thing to keep in mind is that the /M option is also dependent upon any other backups running on the system.  Should another backup routine touch files and, therefore, reset the archive bit, those files would be skipped by this routine.  If that is the case, you would want to leave off the /M option.  Happy robocopying!

Comments

Popular Posts