, ,

Courtsey: MSDN Blogs  Blogs MSDN-2

Download robocopy for windows 2003 server for file server migration to azure with same permission


Configure the Virtual Machine File Server

Utilize the following procedure to configure a Windows Azure Virtual Machine (VM) instance for use as a File Server.

  1. Create the File Server VM instance (e.g. “MyFileServer.cloudapp.net”) using the Windows Azure portal.   See reference instructions here.
  2. Attach and format a blob-storage hosted data-disk to the VM.
  3. Once the File Server instance is running, configure a limited privilege user-account (e.g. “MyUser”).   Note that this service account is a primary security mechanism for the server instance.  Any other VM within the data-center could access your server or cause denial of service.   More advanced server security configuration is beyond the scope of this article.
  4. Using the Server Manager Console, enable the File Server Role.
  5. Create a File Share folder (e.g. “MyShare”) on the attached data-disk and enable read/write access for the MyUser account.
  6. Add two endpoints to the VM for both TCP port 445 and UDP port 445.   This enables the server (at the service deployment level) to communicate SMB protocol with worker-roles hosted in the same Windows Azure data-center.   The SMB protocol is not currently routed externally from the data-center.

Your File Server configuration should appear as follows from the management portal.


With corresponding service end-points configured as illustrated.


And the file share configuration similar to the following image.


There are two options to migrate files between two server


  • Use Robocopy


Robocopy is essentially a tool for copying files from one location to another that has:


  • The ability to copy NTFS permissions, if you want to
  • The ability to skip files that have been copied previously, provided that they have not changed


For the reasons above it is still ideal for using when you want to quickly migrate the contents of a file share to a new server. To do this first set up the new file share on the new destination server, making sure the share and NTFS permissions match those that are configured on the old share on the old server.


Next enter the following command on the admin command prompt, where OLDSERVER is the old file server name, and OLDSHARE is the old share name, and NEWSERVER is the new server name and NEWSHARE is the new share name:




The command basically tells robocopy to copy the contents from the UNC path of the old share, to the UNC path of the new share. The /S and /E tell robocopy to copy any subdirectories, and empty directories. In this example the /COPY:DATS tells robocopy to copy the Data, Attributes, Timestamps and Security information. There are a couple of other elements that you can also copy if you want. To copy everything use /COPY:DATSOU or alternatively /COPYALL. Here is a list of all the flags you can use with the /COPY: part of the command:


D – Data

A – Attributes

T – Timestamps

S – Security i.e. NTFS permissions

O – Owner information

U – Auditing information


Reference : Robocopy and a Few Examples : http://social.technet.microsoft.com/wiki/contents/articles/1073.robocopy-and-a-few-examples.aspx


  • Use File Server Migration Toolkit v1.2


  • To smoothly migrate the DFS root, you may consider using File Server Migration Toolkit v1.1 to migrate the DFS namespace from the old Windows Server 2003 to the new Windows Server 2008. By using File Server Migration Toolkit, we can copy shared folders, files, and their security settings from a source file server to a target file server without losing their share and NTFS security settings. It is very easy to use FSMT, which can save you lots of time and effort.


  • For more detailed information about FSMT, you may refer to the following documents.


Download: Microsoft File Server Migration Toolkit 1.2 http://www.microsoft.com/downloads/details.aspx?FamilyID=d00e3eae-930a-42b0-b595-66f462f5d87b&DisplayLang=en


Overview of the Microsoft File Server Migration Toolkit http://www.microsoft.com/downloads/details.aspx?familyid=604BE797-D19E-4BC1-A148-B48FC731135E&displaylang=en