#Azure: Step by step WAImportExport


0
1 share
(Last Updated On: January 5, 2019)

Azure Import/Export process is a service offered by Microsoft to allow their customers to migrate their data from on-premises to cloud via Import Job and from cloud to on-premises via Export Job. To know more about the prerequisite, limitation and job creation process refer here.

In this article, I am going to explain you step by step WAImportExport process using both the version of the available tool.

Before we go to the disk preparation process using WAImportExport tool, let me explain storage account concepts for Import/Export job.

Login to the Azure Portal and create storage account. Please consider the following limitation or guidance to choose between storage account v1 and v2.

WAImportExport v1 (download) WAImportExport v2 (download)
Storage Account v1

Import and Export

Blob storage

Storage Account v1 and v2

Only Import

Blob and File Storage

If you have not created your storage account yet, follow the following steps.

Storage Account v1:

Login to the Azure Portal, get into your resource group and search for storage account.

Select “Storage account – blob, file, table, queue”

Click on create to start the storage account creation process.

Fill the necessary details as per your requirement, click on “Review + create” to run the validation.

Review the details and click on create.

You can look at your storage account either using “Storage Explorer (preview)” or Microsoft Azure Storage Explorer.

You can also create containers using storage explorer. Right click on the BLOB CONTAINERS and create new blob container that we will use for import job. You can also create multiple containers based on your need.

Enter the name of the container and set the access level.

You can also perform the same job using Microsoft Azure Storage Explorer, it is desktop version of the tool.

Storage Account v2:

Same as above for storage account v2. Fill the necessary details and click on “Review + create” to pass the validation.

Click on create to create the storage account.

Same as version 1, right click on blob or file to create the blob container or file share respectively.

If you are using file share, make sure that you are going to follow the file share limitations. For example, file share has quota of 5TB per share. Therefore, if you are using 10 TB disks for Azure Import then don’t think that single disk data of 10 TB can be copied into two file shares.

Now, it’s time to connect your disk with your machine where you have admin access.

Connect the disk and go to the disk management, always use single partition.

Format the disk with NTFS.

Once, it is done you can see it in your explorer. Take a note of the drive letter.

Now, it is time to encrypt your disk with BitLocker. I am using windows 10 Pro, and it is enable by default. If you are using windows server then you can enable it from add or remove programs and features.

Enter the password that you would like to use to unlock your drive.

Save the recovery key by using “Save to a file” option.

Select the second option to encrypt your entire drive.

BitLocker will take some time to encrypt your drive.

Once you are ready with encrypted drive, copy your data to the drive only if you are going to use version 1 of the WAImportExport tool.

Now, download Microsoft Azure Import/Export tool if you have not downloaded yet.

Download v1: and unzip in c drive or any other drive if you have but not in import disk.

Download v2: and unzip in c drive or any other drive if you have but not in import disk.

Now, it’s a time to prepare yourself to run WAImportExport tool.

Run “wmic diskdrive get serialnumber” to get the serial number of the disk that is going to be used for import job. As Microsoft prefers to write the .jrn (Journal) file name using the serial number of the disk. It will show you the disks serial number in sequence. In my case it is the second one.

Run “manage-bde -protectors -get <drive letter>:” and copy the password and save it in notepad for reuse.

You also need the storage account access key. Go to the Azure Portal and copy the key and save it to the notepad for reuse.

Only for WAImportExportV1:

Open another PowerShell window (Run as Administrator) and get into the prompt of WAImportExport folder. In my case it is in c drive and the folder name is WAImportExportV1.

Run the following command:

./WAImportExport.exe PrepImport /j:AA00000000000489.jrn /id:sessionid001 /sk:hOWMuxy8KVc7vtyedfyCpS0ZLX4paW0iqm0n/AUmd8691eEJZ2BAvv7i6ieR24RRr/0QCV7cpWZ9DFHOo8MBEw== /t

:f /bk:711128-706761-572099-107569-690404-266167-411477-626791 /srcdir:f:\ /dstdir:datav1/ /skipwrite

Where:

./WAImportExport.exe is an executable file in the WAImportExportV1 folder.

PrepImport: Preparing the drive for the import job.

/j:<serial number of the disk>.jrn.

/id:<specific identity> to remember the disks when you are performing this operation with multiple disks or multiple time. It must be at least 3 characters.

/sk:<key of the storage account>

/t:<drive letter of the import disk>, here t stands for target disk or path.

/bk:<Paste the BitLocker key> that we have copied earlier.

/srcdir:<source disk drive letter>\ (It is the same drive letter as we have already copied the data in import drive, but it is only applicable to version 1 of the tool).

/dstdir:<blob container name> that we had created in the beginning for storage account v1.

/skipwrite: to skip the writing on the disk as we have already copied the data.

Once process completes, you can see the journal file in WAImportExport folder. Save this file as you need it to raise an import job from the Azure Portal.

Here is the process to create an Import and Export Job from the portal

Only for WAImportExportV2:

If you are using version 2 of the tool, you must have not copied any data to the import drive directly.

Here, we will define the data source location and other required parameters by editing dataset.csv and driveset.csv.

Edit dataset.csv and define

BasePath: <enter source data path>

DstItemPathOrPrefix: <container or fileshare name> that you have created in your storage account.

ItemType: “BlockBlob” for blob storage and “file” for file share.

Disposition: rename

MetadataFile: None

PropertiesFile: None

Run “manage-bde -protectors -get <drive letter>:” and copy the password.

Now, open driveset.csv and define:

DriveLetter: dirve letter of the import drive

FormatOption: AlreadyFormatted

SilentorPromptOnFormat: SilentMode

Encryption: AlreadyEncrypted

ExistingBitLockerKey: <BitLocker Password> that you have copied in the previous step.

Open another PowerShell window (Run as Administrator) and get into the prompt of WAImportExport folder. In my case it is in c drive and the folder name is WAImportExportV2.

Run the following command: .\WAImportExport.exe PrepImport /j:AA00000000000489.jrn /id:sessionid002 /sk:nBjukbF0WU4yb0tWGgsJ+QqPShb08lUeXaNUx/rJmsiBIdIRf1VGT/ZB3p+llgMD86XrZKf8ffEy+V5ZYLdenA== /InitialDriveSet:driveset.csv /DataSet:dataset.csv /logdir:e:\

You can look at the log file.

Hope, you have completed your WAImportExport process successfully. Please feel free to share your feedback.


Like it? Share with your friends!

0
1 share
Ajay Kakkar

Newbie

Ajay is a Microsoft Most Valuable Professional with diversified IT industry experience in end to end solution designing, engineering, enterprise architecture, presales, consulting, technical advisory, transition and transformation, project management, building, mentoring & managing technology teams, and successfully delivering projects on time with scope.He is author of technical blogs and reviewer of Microsoft Press books. Speaker in many forums (Microsoft conferences and local user groups) across the country for end-user, infrastructure and cloud technologies.

0 Comments

Leave a Reply

Send this to a friend