您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

使用 Azure 导入/导出服务从 Azure Blob 存储导出数据Use the Azure Import/Export service to export data from Azure Blob storage

本文分步说明如何使用 Azure 导入/导出服务从 Azure Blob 存储安全地导出大量数据。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. 该服务要求你将空驱动器寄送到 Azure 数据中心。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.

先决条件Prerequisites

在创建导出作业以从 Azure Blob 存储传输数据之前,请仔细查看并完成以下此服务的先决条件列表。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:

  • 拥有可用于导入/导出服务的有效 Azure 订阅。Have an active Azure subscription that can be used for the Import/Export service.
  • 拥有至少一个 Azure 存储帐户。Have at least one Azure Storage account. 请参阅导入/导出服务支持的存储帐户和存储类型的列表。See the list of Supported storage accounts and storage types for Import/Export service. 有关创建新存储帐户的信息,请参阅如何创建存储帐户For information on creating a new storage account, see How to Create a Storage Account.
  • 拥有足够数量的受支持类型的磁盘。Have adequate number of disks of Supported types.
  • 具有 FedEx/DHL 帐户。Have a FedEx/DHL account. 如果要使用 FedEx/DHL 以外的运营商,请在 上adbops@microsoft.com与 Azure 数据框操作团队联系。If you want to use a carrier other than FedEx/DHL, contact Azure Data Box Operations team at adbops@microsoft.com.
    • 该帐户必须是有余额的有效帐户,且有退货功能。The account must be valid, should have balance, and must have return shipping capabilities.
    • 生成导出作业的跟踪号。Generate a tracking number for the export job.
    • 每个作业都应有一个单独的跟踪号。Every job should have a separate tracking number. 不支持多个作业共享相同跟踪号。Multiple jobs with the same tracking number are not supported.
    • 如果没有承运商帐户,请转到:If you do not have a carrier account, go to:

步骤 1:创建导出作业Step 1: Create an export job

在 Azure 门户中执行以下步骤来创建导出作业。Perform the following steps to create an export job in the Azure portal.

  1. 登录到 https://portal.azure.com/。Log on to https://portal.azure.com/.

  2. 转到“所有服务”>“存储”>“导入/导出作业”****。Go to All services > Storage > Import/export jobs.

    转到导入/导出作业

  3. 单击"创建导入/导出作业"。Click Create Import/export Job.

    单击导入/导出作业

  4. 在“基本信息”**** 中:In Basics:

    • 选择“从 Azure 导出”****。Select Export from Azure.

    • 为导出作业输入一个描述性名称。Enter a descriptive name for the export job. 使用所选名称来跟踪作业进度。Use the name you choose to track the progress of your jobs.

      • 此名称只能包含小写字母、数字、连字符和下划线。The name may contain only lowercase letters, numbers, hyphens, and underscores.
      • 此名称必须以字母开头,并且不得包含空格。The name must start with a letter, and may not contain spaces.
    • 选择一个订阅。Select a subscription.

    • 输入或选择一个资源组。Enter or select a resource group.

      基础

  5. 在“作业详细信息”中****:In Job details:

    • 选择要导出的数据所在的存储帐户。Select the storage account where the data to be exported resides. 使用附近位置的存储帐户。Use a storage account close to where you are located.

    • 放置位置会根据选定存储帐户所属的区域自动进行填充。The dropoff location is automatically populated based on the region of the storage account selected.

    • 指定要从存储帐户导出到空驱动器的 blob 数据。Specify the blob data you wish to export from your storage account to your blank drive or drives.

    • 选择“全部导出”以导出存储帐户中的所有 blob 数据****。Choose to Export all blob data in the storage account.

      全部导出

    • 可以指定要导出的容器和 blob。You can specify which containers and blobs to export.

      • 指定要导出的 blob:使用“等于”**** 选择器。To specify a blob to export: Use the Equal To selector. 指定 blob 的相对路径,以容器名称开头。Specify the relative path to the blob, beginning with the container name. 使用 $root 指定根容器。Use $root to specify the root container.

      • 指定以前缀开头的所有 blob:使用“开头为”**** 选择器。To specify all blobs starting with a prefix: Use the Starts With selector. 指定以正斜杠“/”开头的前缀。Specify the prefix, beginning with a forward slash '/'. 该前缀可以是容器名称的前缀、完整容器名称或者后跟 Blob 名称前缀的完整容器名称。The prefix may be the prefix of the container name, the complete container name, or the complete container name followed by the prefix of the blob name. 必须以有效格式提供 blob 路径,以免在处理过程中出现错误,如以下屏幕截图所示。You must provide the blob paths in valid format to avoid errors during processing, as shown in this screenshot. 有关详细信息,请参阅有效 blob 路径示例For more information, see Examples of valid blob paths.

        导出所选容器和 blob

    • 可以从 blob 列表文件进行导出。You can export from the blob list file.

      从 blob 列表文件导出

    备注

    如果在复制数据时,要导出的 blob 正在使用中,则 Azure 导入/导出服务将生成该 blob 的快照并复制快照。If the blob to be exported is in use during data copy, Azure Import/Export service takes a snapshot of the blob and copies the snapshot.

  6. 在“回寄信息”中****:In Return shipping info:

    • 从下拉列表中选择承运商。Select the carrier from the dropdown list. 如果要使用联邦快递/DHL 以外的运营商,请从下拉列表中选择现有选项。If you want to use a carrier other than FedEx/DHL, choose an existing option from the dropdown. 请与 Azure 数据框adbops@microsoft.com操作团队联系,了解有关计划使用的运营商的信息。Contact Azure Data Box Operations team at adbops@microsoft.com with the information regarding the carrier you plan to use.

    • 输入你已在该承运商那里创建的有效承运商帐户编号。Enter a valid carrier account number that you have created with that carrier. 导出作业完成后,Microsoft 使用此帐户将驱动器运回您。Microsoft uses this account to ship the drives back to you once your export job is complete.

    • 提供完整、有效的联系人姓名、电话号码、电子邮件地址、街道地址、城市、邮政编码、省/自治区/直辖市和国家/地区。Provide a complete and valid contact name, phone, email, street address, city, zip, state/province and country/region.

      提示

      请提供组电子邮件,而非为单个用户指定电子邮件地址。Instead of specifying an email address for a single user, provide a group email. 这可确保即使管理员离开也会收到通知。This ensures that you receive notifications even if an admin leaves.

  7. 在“摘要”中****:In Summary:

    • 查看作业详细信息。Review the details of the job.

    • 记下作业名称以及为将磁盘寄送到 Azure 而提供的 Azure 数据中心寄送地址。Make a note of the job name and provided Azure datacenter shipping address for shipping disks to Azure.

      备注

      始终将磁盘发送到 Azure 门户中记录的数据中心。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.

    • 单击“确定”以完成导出作业的创建****。Click OK to complete export job creation.

步骤 2:寄送驱动器Step 2: Ship the drives

如果不知道所需的驱动器数量,请转到检查驱动器数量If you do not know the number of drives you need, go to the Check the number of drives. 如果知道驱动器数量,则直接寄送驱动器。If you know the number of drives, proceed to ship the drives.

可以使用 FedEx、UPS 或 DHL 将包裹寄送到 Azure 数据中心。FedEx, UPS, or DHL can be used to ship the package to Azure datacenter. 如果要使用 FedEx/DHL 以外的运营商,请与 Azure 数据盒操作团队联系:adbops@microsoft.comIf you want to use a carrier other than FedEx/DHL, contact Azure Data Box Operations team at adbops@microsoft.com

  • 必须提供有效的 FedEx、UPS 或 DHL 承运商帐号,以便 Microsoft 可以寄回驱动器。Provide a valid FedEx, UPS, or DHL carrier account number that Microsoft will use to ship the drives back.
    • 必须有 FedEx、UPS 或 DHL 帐号,才能从美国和欧洲寄回驱动器。A FedEx, UPS, or DHL account number is required for shipping drives back from the US and Europe locations.
      • 将驱动器从亚洲和澳大利亚寄回时,推荐使用 DHL 账号。A DHL account number is preferred for shipping drives back from Asia and Australia locations.
      • 如果还没有帐户编号,请创建一个 FedExDHL 承运商帐户。If you do not have an account number, create a FedEx or DHL carrier account.
  • 寄送包裹时,必须遵循 Microsoft Azure 服务条款When shipping your packages, you must follow the Microsoft Azure Service Terms.
  • 正确地打包磁盘以避免潜在的损坏和处理延迟。Properly package yours disks to avoid potential damage and delays in processing.

步骤 3:使用跟踪信息更新作业Step 3: Update the job with tracking information

寄送磁盘后,请返回到 Azure 门户中的“导入/导出”**** 页面。After shipping the disks, return to the Import/Export page on the Azure portal.

重要

如果在创建作业后的 2 周内未更新跟踪号,该作业会过期。If the tracking number is not updated within 2 weeks of creating the job, the job expires.

若要更新跟踪号,请执行以下步骤。To update the tracking number, perform the following steps.

  1. 选择并单击作业。Select and click the job.
  2. 单击“寄送驱动器后更新作业状态和跟踪信息”****。Click Update job status and tracking info once drives are shipped.
  3. 选中“标记为已寄送”**** 旁的复选框。Select the checkbox against Mark as shipped.
  4. 提供承运商信息**** 和跟踪号****。Provide the Carrier and Tracking number.
  5. 在门户仪表板上跟踪作业进度。Track the job progress on the portal dashboard. 有关每个作业状态的说明,请转到查看作业状态For a description of each job state, go to View your job status.

步骤 4:接收磁盘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 on the portal.

  1. 收到包含导出数据的驱动器后,你需要获取 BitLocker 密钥才能解锁驱动器。After you receive the drives with exported data, you need to get the BitLocker keys to unlock the drives. 转到 Azure 门户中的导出作业。Go to the export job in the Azure portal. 单击“导入/导出”选项卡****。Click Import/Export tab.

  2. 从列表中选择并单击导出作业。Select and click your export job from the list. 转到加密并复制密钥。Go to Encryption and copy the keys.

    查看导出作业的 BitLocker 密钥

  3. 使用 BitLocker 密钥解锁磁盘。Use the BitLocker keys to unlock the disks.

导出已完成。The export is complete.

第 5 步:解锁磁盘Step 5: Unlock the disks

如果使用 WAImportExport 工具的版本 1.4.0.300,请使用以下命令解锁驱动器:If using version 1.4.0.300 of the WAImportExport tool, use the following command to unlock the drive:

`WAImportExport Unlock /externalKey:<BitLocker key (base 64 string) copied from journal (*.jrn*) file>`  

如果使用该工具的早期版本,请使用 BitLocker 对话框解锁驱动器。If using earlier versions of the tool, use the BitLocker dialog to unlock the drive.

此时,您可以删除作业或离开它。At this time, you can delete the job or leave it. 作业在 90 天后自动删除。Jobs automatically get deleted after 90 days.

检查驱动器数量Check the number of drives

可选步骤有助于确定导出作业所需的驱动器数量。This optional step helps you determines the number of drives required for the export job. 在运行受支持 OS 版本的 Windows 系统上执行此步骤。Perform this step on a Windows system running a Supported OS version.

  1. 在 Windows 系统上下载 WAImportExport 版本 1Download the WAImportExport version 1 on the Windows system.

  2. 解压缩到默认文件夹 waimportexportv1Unzip to the default folder waimportexportv1. 例如,C:\WaImportExportV1For example, C:\WaImportExportV1.

  3. 使用管理权限打开 PowerShell 或命令行窗口。Open a PowerShell or command line window with administrative privileges. 若要将目录切换到解压缩的文件夹,请运行以下命令:To change directory to the unzipped folder, run the following command:

    cd C:\WaImportExportV1

  4. 若要检查选定 blob 所需的磁盘数量,请运行以下命令:To check the number of disks required for the selected blobs, run the following command:

    WAImportExport.exe PreviewExport /sn:<Storage account name> /sk:<Storage account key> /ExportBlobListFile:<Path to XML blob list file> /DriveSize:<Size of drives used>

    下表介绍了这些参数:The parameters are described in the following table:

    命令行参数Command-line parameter 描述Description
    /logdir:/logdir: 可选。Optional. 日志目录。The log directory. 详细日志文件将写入此目录。Verbose log files are written to this directory. 如果未指定,则使用当前目录作为日志目录。If not specified, the current directory is used as the log directory.
    /sn:/sn: 必需。Required. 导出作业的存储帐户的名称。The name of the storage account for the export job.
    /sk:/sk: 仅当未指定容器 SAS 时才是必需的。Required only if a container SAS is not specified. 导出作业的存储帐户的帐户密钥。The account key for the storage account for the export job.
    /csas:/csas: 仅当未指定存储帐户密钥时才是必需的。Required only if a storage account key is not specified. 用于列出要在导出作业中导出的 Blob 的容器 SAS。The container SAS for listing the blobs to be exported in the export job.
    /ExportBlobListFile:/ExportBlobListFile: 必需。Required. 包含要导出的 Blob 的 Blob 路径列表或 Blob 路径前缀的 XML 文件的路径。Path to the XML file containing list of blob paths or blob path prefixes for the blobs to be exported. 导入/导出服务 REST API 的放置作业操作的 BlobListBlobPath 元素中使用的文件格式。The file format used in the BlobListBlobPath element in the Put Job operation of the Import/Export service REST API.
    /DriveSize:/DriveSize: 必需。Required. 用于导出作业的驱动器大小,例如 500 GB、1.5 TB。The size of drives to use for an export job, e.g., 500 GB, 1.5 TB.

    请参阅 PreviewExport 命令示例See an Example of the PreviewExport command.

  5. 检查能否读取/写入要寄送的用于导出作业的驱动器。Check that you can read/write to the drives that will be shipped for the export job.

PreviewExport 命令示例Example of PreviewExport command

以下示例演示了 PreviewExport 命令:The following example demonstrates the PreviewExport command:

    WAImportExport.exe PreviewExport /sn:bobmediaaccount /sk:VkGbrUqBWLYJ6zg1m29VOTrxpBgdNOlp+kp0C9MEdx3GELxmBw4hK94f7KysbbeKLDksg7VoN1W/a5UuM2zNgQ== /ExportBlobListFile:C:\WAImportExport\mybloblist.xml /DriveSize:500GB

导出 Blob 列表文件可能包含 Blob 名称和 Blob 前缀,如下所示:The export blob list file may contain blob names and blob prefixes, as shown here:

<?xml version="1.0" encoding="utf-8"?>  
<BlobList>  
<BlobPath>pictures/animals/koala.jpg</BlobPath>  
<BlobPathPrefix>/vhds/</BlobPathPrefix>  
<BlobPathPrefix>/movies/</BlobPathPrefix>  
</BlobList>  

Azure 导入/导出工具可列出要导出的所有 blob,在考虑所有必要开销的情况下计算如何将其打包到指定大小的驱动器,然后估算保存 blob 和驱动器使用情况信息所需的驱动器数量。The Azure Import/Export Tool lists all blobs to be exported and calculates how to pack them into drives of the specified size, taking into account any necessary overhead, then estimates the number of drives needed to hold the blobs and drive usage information.

下面是一个省略了信息性日志的输出示例:Here is an example of the output, with informational logs omitted:

Number of unique blob paths/prefixes:   3  
Number of duplicate blob paths/prefixes:        0  
Number of nonexistent blob paths/prefixes:      1  

Drive size:     500.00 GB  
Number of blobs that can be exported:   6  
Number of blobs that cannot be exported:        2  
Number of drives needed:        3  
        Drive #1:       blobs = 1, occupied space = 454.74 GB  
        Drive #2:       blobs = 3, occupied space = 441.37 GB  
        Drive #3:       blobs = 2, occupied space = 131.28 GB

有效 blob 路径示例Examples of valid blob paths

下表显示有效 Blob 路径的示例:The following table shows examples of valid blob paths:

选择器Selector Blob 路径Blob Path 描述Description
开头为Starts With / 导出存储帐户中的所有 BlobExports all blobs in the storage account
开头为Starts With /$root//$root/ 导出根容器中的所有 BlobExports all blobs in the root container
开头为Starts With /book/book 导出任何容器中以前缀 book 开头的所有 BlobExports all blobs in any container that begins with prefix book
开头为Starts With /music//music/ 导出容器 music 中的所有 BlobExports all blobs in container music
开头为Starts With /music/love/music/love 导出容器 music 中以前缀 love 开头的所有 BlobExports all blobs in container music that begin with prefix love
等于Equal To $root/logo.bmp$root/logo.bmp 导出根容器中的 Blob logo.bmpExports blob logo.bmp in the root container
等于Equal To videos/story.mp4videos/story.mp4 导出容器 videos 中的 Blob story.mp4Exports blob story.mp4 in container videos

后续步骤Next steps