File Server Migration to Azure Using Azcopy Utility

What is AzCopy ?

Azcopy is command line utility designed to copy the data from Microsoft azure Blob, Files, Table Storage using the simple command line .

Below are the scenario we can use the Azcopy Utility.

  • On-premises File server to Azure File Storage Vise-versa.

  • Between Azure storage Accounts.

  • Between two different subscription Azure storage accounts.

  • We can copy the data Form Classic (ASM) mode to ARM model.

  • We can download/Upload and copy  the Blob ,File, Table (Export and Import) storage using the Azcopy Command.

  • Resume interrupted operations

It is buildup with .Net framework and can be use in  windows and Linux platform.

 How to Download  & Install the Azcopy Utility ?

 Please download the Azcopy Command line utility using the below link.

Please do copy and paste the below URL in the browse after that it will automatically download the Azcopy Utility.

 http://aka.ms/downloadazcopy(DownloadAzCopy)

  • Once the We will download the setup.

  • Right Click on MicrosoftAzurestorageTool and Run the As in administrator.

  • We will get the welcome Page and then click Next

Installtion 1

  • Accept the End-User License Agreement and Click Next.

Installtion 2

  • Select the  Destination folder we want to keep the installation files.Click Next.

installtion 3

  • We will get the Azcopy installation page, Click on Installation  and Install the AzCopy Utility.

installtion 4

  • Once it is install , It is install Click on Finish and now your Azcopy utility is installed on your Windows system.

installtion 5

Method 1:-

Once It is installed you can search on your PC Azcopy and open Run as Administrator.

 

Open Azcopy storate command

You will get below Command line utility to use to migrate the files, download the blobs etc for storage accounts.

  • Azutilites

Method-2

  • Open a CMD Command and then go to Azcopy location :

  • C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy\

  • Run the Azcopy Command.CMD azcopy

Migrating On_premises File to Azure File Storage Accounts Using Azcopy

Step 1: Create the Storage account

  • Login to Azure portal (https://portal.azure.com) using the Azure subscription Credentials.
  • Click on + Sign :
  • Click on Storage ;
  • Select the Storage accounts-Blob,File,Table,Storage:
  • Provide the Name of Storage as per our organization standard:
  • Select the Deployment model:
  • Account Kind:
  • Performance :
  • Replications:
  • Secure Transfer :
  • REsourceGroup and Location We want create the storage accounts:

Storage account Creation.jpg

  • Once the Storage Account is created , Please create the File Storage accounts.
  • We can also move the data to Azure Container as well if required.

Note: Please make sure all the .Vhd File has to move to azure blob container under Page blob if you are planning  t0 use the .Vhd file for customized or Specialized image. 

Step 2: Create the File Storage

Click on the Files

File storage

  • Add the Fileshare

  • Provide the fileserver Name

  • Quota :100 GB.

Note: File storage can store the 5 TB Data  which is the limit by default for file storage.

File storage1

Click on the Properties and Copy the Sharepath (URL).

File storage2

Step -3 Accessing the Source Key

  • Select the Storage account
  • Go to Settings
  • Select the Access Key  and Copy the Primary access Key
  • keep the information on notepad.

Source key.jpg

 

Step-4 Run the AzCopy Command in Azcopy utilities.

Please do use the below command to move the files to azure file servers.

AzCopy /Source:E:\Rcloudweb(Your On-premises server location) /Dest:https://Fileserver.file.core.windows.net/rcloudweb/(Azure File storage location) /DestKey:key of your storage Account /S(switch is used to copy the complete folder)

Please find the below Example Screenshot of Azcopy command which is successfully run.

Azcopy Command.jpg

Step-5 Migrating Files Verification.

As you can see below i have successfully migrated my file and folders successfully.

Verfication..jpg

 

Copy across file shares

AzCopy /Source:https://rcloudweb1.file.core.windows.net/rcloudweb1/ /Dest:https://rcloudweb2.file.core.windows.net/rcloudweb2/ /SourceKey:key1(Rcloudweb1 storage access key) /DestKey:key2 (Rcloudweb2 storage access key)/S

File Download

AzCopy /Source:https://rcloudweb.file.core.windows.net/rcloudweb/rcloudweb1/ /Dest:C:\rcloudweb /SourceKey:key (Rcloudweb storage access key) /Pattern:abc.txt

Download all files

AzCopy /Source:https://rcloudweb.file.core.windows.net/rcloudweb/ /Dest:C:\rcloudweb /SourceKey:key (Rcloudweb storage access key) /S

Copy single blob within Storage account

AzCopy /Source:https://rcloudweb1.blob.core.windows.net/rcloudweb1 /Dest:https://rcloudweb2.blob.core.windows.net/rcloudweb2 /SourceKey:key(Rcloudweb1 storage access key)/DestKey:key (Rcloudweb2 storage access key)/Pattern:rcloudfile.txt

For  More Azure Azcopy Command , you can got to Microsoft azcopy documents by following below links.

https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s