Tutorial: Export data from Azure Blob storage with Azure Import/Export
Article
17 minutes to read
This article provides step-by-step instructions on how to use the Azure Import/Export service to securely export large amounts of data from Azure Blob storage. The service requires you to ship empty drives to the Azure datacenter. The service exports data from your storage account to the drives and then ships the drives back.
In this tutorial, you learn how to:
Prerequisites to export data from Azure Blob storage with Azure Import/Export
Step 1: Create an export job
Step 2: Ship the drives
Step 3: Update the job with tracking information
Step 4: Receive the disks
Step 5: Unlock the disks
Prerequisites
Before you create an export job to transfer data out of Azure Blob Storage, carefully review and complete the following list of prerequisites for this service.
You must:
Have an active Azure subscription that can be used for the Import/Export service.
Have adequate number of disks of Supported types. You can use the Azure Import/Export tool to determine how many disks to provide. For steps, see Determine drives to use.
Have a valid carrier account and a tracking number for the order:
You must use a carrier in the Carrier names list on the Shipping tab for your order. If you don't have a carrier account, contact the carrier to create one.
The carrier account must be valid, should have a balance, and must have return shipping capabilities. Microsoft will ship back all storage media using the selected carrier.
Generate a tracking number for the import/export job in the carrier account. Every job should have a separate tracking number. Multiple jobs with the same tracking number aren't supported.
Perform the following steps to order an import job in Azure Import/Export via the Preview portal. The Azure Import/Export service in preview will create a job of the type "Data Box."
Select + Create a resource and search for Azure Data Box. Select Azure Data Box.
Select Create.
To get started with the import order, select the following options:
Select the Export from Azure transfer type.
Select the subscription to use for the Import/Export job.
Select a resource group.
Select the Source Azure region for the job.
Select the Destination country/region for the job.
Then select Apply.
Choose the Select button for Import/Export Job.
In Basics:
Enter a descriptive name for the job. Use the name to track the progress of your job.
The name must have from 3 to 24 characters.
The name must include only letters, numbers, and hyphens.
The name must start and end with a letter or number.
Select Next: Job details > to proceed.
In Job Details:
Select the Source Azure region where your data currently is.
Select the storage account from which you want to export data. Use a storage account close to your location.
The drop-off location is automatically populated based on the region of the storage account that you select.
Specify the blob data to export from your storage account to your blank drive or drives. For Blobs to export, choose one of the three following methods.
Choose to export All objects in the storage account.
Choose Selected containers and blobs, and specify containers and blobs to export. You can use more than one of the selection methods. Selecting an Add option opens a panel on the right where you can add your selection strings.
Option
Description
Add containers
Export all blobs in a container. Select Add containers, and enter each container name.
Add blobs
Specify individual blobs to export. Select Add blobs. Then specify the relative path to the blob, beginning with the container name. Use $root to specify the root container. You must provide the blob paths in valid format, as shown in this screenshot, to avoid errors during processing. For more information, see Examples of valid blob paths.
Add prefixes
Use a prefix to select a set of similarly named containers or similarly named blobs in a container. The prefix may be the prefix of the container name, the complete container name, or a complete container name followed by the prefix of the blob name.
Choose Export from blob list file (XML format), and select an XML file that contains a list of paths and prefixes for the blobs to be exported from the storage account. You must construct the XML file and store it in a container for the storage account. The file cannot be empty.
Important
If you use an XML file to select the blobs to export, make sure that the XML contains valid paths and/or prefixes. If the file is invalid or no data matches the paths specified, the order terminates with partial data or no data exported.
If a blob to be exported is in use during data copy, the Azure Import/Export service takes a snapshot of the blob and copies the snapshot.
Select Next: Return shipping > to proceed.
In Return shipping:
Select a shipping carrier from the drop-down list for Carrier. The location of the Microsoft datacenter for the selected region determines which carriers are available.
Enter a Carrier account number. The account number for an valid carrier account is required.
In the Return address area, use + Add Address to add the address to ship to.
On the Add Address blade, you can add an address or use an existing one. When you finish entering address information, select Add shipping address.
In the Notification area, enter email addresses for the people you want to notify of the job's progress.
Tip
Instead of specifying an email address for a single user, provide a group email to ensure that you receive notifications even if an admin leaves.
Select Review + Create to proceed.
In Review + Create:
Review the Terms, and then select "I acknowledge that all the information provided is correct and agree to the terms and conditions above." Validation is then performed.
Review the job information. Make a note of the job name and the Azure datacenter shipping address to ship disks back to. This information is used later on the shipping label.
Select Create.
After the job is created, you'll see the following message.
You can select Go to resource to open the Overview of the job.
Perform the following steps to create an export job in the Azure portal using the classic Azure Import/Export service.
Select a resource group, or select Create new and create a new one.
Enter a descriptive name for the import job. Use the name to track the progress of your jobs.
The name may contain only lowercase letters, numbers, and hyphens.
The name must start with a letter, and may not contain spaces.
Select Export from Azure.
Select a Source Azure region.
If the new import/export experience is available in the selected region, you'll see a note inviting you to try the new experience. Select Try now, and follow the steps on the Portal (Preview) tab of this section to try the new experience with this order.
Select Next: Job Details > to proceed.
In Job details:
Select the Azure region where your data currently is.
Select the storage account from which you want to export data. Use a storage account close to your location.
The drop-off location is automatically populated based on the region of the storage account selected.
Specify the blob data to export from your storage account to your blank drive or drives. Choose one of the three following methods.
Choose to Export all blob data in the storage account.
Choose Selected containers and blobs, and specify containers and blobs to export. You can use more than one of the selection methods. Selecting an Add option opens a panel on the right where you can add your selection strings.
Option
Description
Add containers
Export all blobs in a container. Select Add containers, and enter each container name.
Add blobs
Specify individual blobs to export. Select Add blobs. Then specify the relative path to the blob, beginning with the container name. Use $root to specify the root container. You must provide the blob paths in valid format to avoid errors during processing, as shown in this screenshot. For more information, see Examples of valid blob paths.
Add prefixes
Use a prefix to select a set of similarly named containers or similarly named blobs in a container. The prefix may be the prefix of the container name, the complete container name, or a complete container name followed by the prefix of the blob name.
Choose Export from blob list file (XML format), and select an XML file that contains a list of paths and prefixes for the blobs to be exported from the storage account. You must construct the XML file and store it in a container for the storage account. The file cannot be empty.
Important
If you use an XML file to select the blobs to export, make sure that the XML contains valid paths and/or prefixes. If the file is invalid or no data matches the paths specified, the order terminates with partial data or no data exported.
If a blob to be exported is in use during data copy, the Azure Import/Export service takes a snapshot of the blob and copies the snapshot.
Select Next: Shipping > to proceed.
In Shipping:
Select the carrier that you want to use from the dropdown list for Carrier name. Microsoft will use the selected carrier to ship back all storage media.
Enter the Carrier account number for a valid account that you've created with the carrier. For carrier account requirements, see "Prerequisites," above.
Provide a complete and valid contact name, phone, email, street address, city, ZIP code, state/province, and country/region.
Tip
Instead of specifying an email address for a single user, provide a group email to ensure that you receive notifications even if an admin leaves.
Select Review + create to proceed.
In Review + create:
Review the details of the job.
Make a note of the job name and provided Azure datacenter shipping address for shipping disks to Azure.
Note
Always send the disks to the datacenter noted in the Azure portal. If the disks are shipped to the wrong datacenter, the job will not be processed.
Review the Terms for your order for privacy and source data deletion. If you agree to the terms, select the check box beneath the terms. Validation of the order begins.
After validation passes, select Create.
Use the following steps to create an export job in the Azure portal. Azure CLI and Azure PowerShell create jobs in the classic Azure Import/Export service and hence create an Azure resource of the type "Import/Export job."
If you prefer to run CLI reference commands locally, install the Azure CLI. If you're running on Windows or macOS, consider running Azure CLI in a Docker container. For more information, see How to run the Azure CLI in a Docker container.
If you're using a local installation, sign in to the Azure CLI by using the az login command. To finish the authentication process, follow the steps displayed in your terminal. For other sign-in options, see Sign in with the Azure CLI.
When you're prompted, install the Azure CLI extension on first use. For more information about extensions, see Use extensions with the Azure CLI.
Run az version to find the version and dependent libraries that are installed. To upgrade to the latest version, run az upgrade.
az import-export update --resource-group myierg --name MyIEjob1 --cancel-requested true
Use the following steps to create an export job in Azure PowerShell. Azure CLI and Azure PowerShell create jobs in the classic Azure Import/Export service and hence create an Azure resource of the type "Import/Export job."
While the Az.ImportExport PowerShell module is in preview, you must install it separately
using the Install-Module cmdlet. After this PowerShell module becomes generally available, it
will be part of future Az PowerShell module releases and available by default from within Azure
Cloud Shell.
Install-Module -Name Az.ImportExport
Create a job
To get a list of the locations from which you can receive disks, use the Get-AzImportExportLocation cmdlet:
Get-AzImportExportLocation
Run the following New-AzImportExport example to create an export job that uses your existing storage account:
If you do not know the number of drives you need, see Determine how many drives you need. If you know the number of drives, proceed to ship the drives.
FedEx, UPS, or DHL can be used to ship the package to Azure datacenter. If you want to use a carrier other than FedEx/DHL, contact Azure Data Box Operations team at adbops@microsoft.com
Provide a valid FedEx, UPS, or DHL carrier account number that Microsoft will use to ship the drives back.
A FedEx, UPS, or DHL account number is required for shipping drives back from the US and Europe locations.
A DHL account number is preferred for shipping drives back from Asia and Australia locations.
If you do not have an account number, create a FedEx or DHL carrier account.
Properly package your disks to avoid potential damage and delays in processing.
Step 3: Update the job with tracking information
After you ship the disks, return to the job in the Azure portal and fill in the tracking information.
After you provide tracking details, the job status changes to Shipping, and the job can't be canceled. You can only cancel a job while it's in Creating state.
Important
If the tracking number is not updated within 2 weeks of creating the job, the job expires.
At the top of the **For job to progress, provide the tracking information to open the Update status pane. Then complete the entries:
Select the checkbox by Mark as shipped.
Provide the Carrier and Tracking number.
When you finish, select Save.
You can track the job progress on the Overview pane. For a description of each job state, go to View your job status.
If you created your Azure Import/Export job using Azure CLI, open the job in the Azure portal to update tracking information. Azure CLI and Azure PowerShell create jobs in the classic Azure Import/Export service and hence create an Azure resource of the type "Import/Export job."
If you created your Azure Import/Export job using Azure PowerShell, open the job in the Azure portal to update tracking information.
Azure CLI and Azure PowerShell create jobs in the classic Azure Import/Export service and hence create an Azure resource of the type "Import/Export job."
Step 4: Receive the disks
When the dashboard reports the job is complete, the disks are shipped to you and the tracking number for the shipment is available in the portal.
After you receive the drives with exported data, you need to get the BitLocker keys to unlock the drives. Go to the export job in the Azure portal. Click Import/Export tab.
Select and click your export job from the list. Go to Encryption and copy the keys.
Use the BitLocker keys to unlock the disks.
The export is complete.
Step 5: Unlock the disks
Use the following command to unlock the drive:
WAImportExport Unlock /bk:<BitLocker key (base 64 string) copied from Encryption blade in Azure portal> /driveLetter:<Drive letter>
You can use the copy logs from the job to verify that all data transferred successfully:
Use the verbose log to verify each successfully transferred file.
Use the copy log to find the source of each failed data copy.
To find the log locations, open the job in the Azure portal/. The Data copy details show the Copy log path and Verbose log path for each drive that was included in the order.
At this time, you can delete the job or leave it. Jobs automatically get deleted after 90 days.