Azure Blob 儲存體簡介Introduction to Azure Blob storage

Azure Blob 儲存體是 Microsoft 針對雲端推出的物件儲存體解決方案。Azure Blob storage is Microsoft's object storage solution for the cloud. Blob 儲存體已針對儲存大量非結構化資料最佳化。Blob storage is optimized for storing massive amounts of unstructured data. 非結構化資料是指不遵守特定資料模型或定義的資料,例如文字或二進位資料。Unstructured data is data that does not adhere to a particular data model or definition, such as text or binary data.

關於 Blob 儲存體About Blob storage

Blob 儲存體設計用來:Blob storage is designed for:

  • 直接提供映像或文件給瀏覽器。Serving images or documents directly to a browser.
  • 儲存檔案供分散式存取。Storing files for distributed access.
  • 串流傳輸視訊和音訊。Streaming video and audio.
  • 寫入記錄檔。Writing to log files.
  • 儲存備份和還原、災害復原和封存資料。Storing data for backup and restore, disaster recovery, and archiving.
  • 儲存資料供內部部署或 Azure 託管服務進行分析。Storing data for analysis by an on-premises or Azure-hosted service.

使用者或用戶端應用程式可以從世界各地透過 HTTP/HTTPS 存取 Blob 儲存體中的物件。Users or client applications can access objects in Blob storage via HTTP/HTTPS, from anywhere in the world. Blob 儲存體中的物件可透過 Azure 儲存體 REST APIAzure PowerShellAzure CLI 或 Azure 儲存體用戶端程式庫存取。Objects in Blob storage are accessible via the Azure Storage REST API, Azure PowerShell, Azure CLI, or an Azure Storage client library. 用戶端程式庫提供多種語言,包括 .NETJavaNode.jsPythonGoPHPRubyClient libraries are available for a variety of languages, including .NET, Java, Node.js, Python, Go, PHP, and Ruby.

有關 Azure Data Lake Storage Gen2About Azure Data Lake Storage Gen2

Blob 儲存體支援 Azure Data Lake Storage Gen2,這是適用於雲端的 Microsoft 企業巨量資料分析解決方案。Blob storage supports Azure Data Lake Storage Gen2, Microsoft's enterprise big data analytics solution for the cloud. Azure Data Lake Storage Gen2 提供階層式檔案系統和 Blob 儲存體的各項優點,包括低成本、分層式儲存體、高可用性、強式一致性,以及災害復原功能。Azure Data Lake Storage Gen2 offers a hierarchical file system as well as the advantages of Blob storage, including low-cost, tiered storage; high availability; strong consistency; and disaster recovery capabilities.

如需 Data Lake Storage Gen2 的詳細資訊,請參閱 Azure Data Lake Storage Gen2 簡介For more information about Data Lake Storage Gen2, see Introduction to Azure Data Lake Storage Gen2.

Blob 儲存體資源Blob storage resources

Blob 儲存體提供三種類型資源:Blob storage offers three types of resources:

  • 儲存體帳戶The storage account.
  • 儲存體帳戶中的容器A container in the storage account
  • 容器中的 BlobA blob in a container

下圖顯示資源之間的關係。The following diagram shows the relationship between these resources.

帳戶 Blob 與容器資源之間的關係

儲存體帳戶Storage accounts

儲存體帳戶會在 Azure 中為您的資料提供唯一命名空間。A storage account provides a unique namespace in Azure for your data. 每個儲存在 Azure 儲存體中的物件都有一個位址,其中包含您的唯一帳戶名稱。Every object that you store in Azure Storage has an address that includes your unique account name. 帳戶名稱與 Azure 儲存體 Blob 端點的組合會形成儲存體帳戶中物件的基底位址。The combination of the account name and the Azure Storage blob endpoint forms the base address for the objects in your storage account.

例如,如果您的儲存體帳戶名為 mystorageaccount,則 Blob 儲存體的預設端點將是:For example, if your storage account is named mystorageaccount, then the default endpoint for Blob storage is:

http://mystorageaccount.blob.core.windows.net 

若要建立儲存體帳戶,請參閱儲存體帳戶To create a storage account, see Create a storage account. 若要深入了解儲存體帳戶,請參閱 Azure 儲存體帳戶概觀To learn more about storage accounts, see Azure storage account overview.

容器Containers

容器會組織一組 Blob,類似於檔案系統中的目錄。A container organizes a set of blobs, similar to a directory in a file system. 儲存體帳戶可以包含無限數量的容器,而一個容器則可儲存無限數量的 Blob。A storage account can include an unlimited number of containers, and a container can store an unlimited number of blobs.

注意

容器名稱必須是小寫。The container name must be lowercase. 如需為容器命名的詳細資訊,請參閱命名和參考容器、Blob 及中繼資料For more information about naming containers, see Naming and Referencing Containers, Blobs, and Metadata.

BlobBlobs

Azure 儲存體支援三種 blob 類型:Azure Storage supports three types of blobs:

  • 區塊 Blob 可儲存文字和二進位資料 (最多約 4.7 TB)。Block blobs store text and binary data, up to about 4.7 TB. 區塊 Blob 是由可個別管理的資料區塊所組成。Block blobs are made up of blocks of data that can be managed individually.
  • 附加 Blob 和區塊 Blob 相似,由區塊所組成,但已針對附加作業最佳化。Append blobs are made up of blocks like block blobs, but are optimized for append operations. 附加 Blob 很適合某些案例,例如記錄虛擬機器中的資料。Append blobs are ideal for scenarios such as logging data from virtual machines.
  • 分頁 Blob 可儲存隨機存取檔案 (大小上限為 8 TB)。Page blobs store random access files up to 8 TB in size. 分頁 Blob 存放區可儲存虛擬硬碟 (VHD) 檔案,以作為 Azure 虛擬機器的磁碟。Page blobs store virtual hard drive (VHD) files and serve as disks for Azure virtual machines. 如需有關分頁 Blob 的詳細資訊,請參閱 Azure 分頁 Blob 的概觀For more information about page blobs, see Overview of Azure page blobs

如需不同 Blob 類型的相關詳細資訊,請參閱了解區塊 Blob、附加 Blob 及分頁 BlobFor more information about the different types of blobs, see Understanding Block Blobs, Append Blobs, and Page Blobs.

移動資料至 Blob 儲存體Move data to Blob storage

目前已有幾個解決方案,可將現有資料移轉至 Blob 儲存體:A number of solutions exist for migrating existing data to Blob storage:

  • AzCopy 是一個簡單易用的命令列工具,可供 Windows 和 Linux 跨容器或跨儲存體帳戶,將資料複製到 Blob 儲存體或從該處複製資料。AzCopy is an easy-to-use command-line tool for Windows and Linux that copies data to and from Blob storage, across containers, or across storage accounts. 如需 AzCopy 的相關詳細資訊,請參閱使用 AzCopy v10 (預覽) 傳輸資料For more information about AzCopy, see Transfer data with the AzCopy v10 (Preview).
  • Azure 儲存體資料移動程式庫是用於在 Azure 儲存體服務之間移動資料的 .NET 程式庫。The Azure Storage Data Movement library is a .NET library for moving data between Azure Storage services. AzCopy 公用程式已內建資料移動程式庫。The AzCopy utility is built with the Data Movement library. 如需詳細資訊,請參閱資料移動程式庫的參考文件For more information, see the reference documentation for the Data Movement library.
  • Azure Data Factory支援使用「帳戶金鑰」、「共用存取簽章」、「服務主體」或「Azure 資源的受控識別」來複製資料至 Blob 儲存體,或從該處複製資料。Azure Data Factory supports copying data to and from Blob storage by using the account key, a shared access signature, a service principal, or managed identities for Azure resources. 如需詳細資訊,請參閱使用 Azure Data Factory 將資料複製到 Azure Blob 或從該處複製資料For more information, see Copy data to or from Azure Blob storage by using Azure Data Factory.
  • Blobfuse 是 Azure Blob 儲存體的虛擬檔案系統驅動程式。Blobfuse is a virtual file system driver for Azure Blob storage. 您可以使用 Blobfuse 透過 Linux 檔案系統存取您儲存體帳戶中現有的區塊 Blob 資料。You can use blobfuse to access your existing block blob data in your Storage account through the Linux file system. 如何詳細資訊,請參閱如何使用 Blobfuse 將 Blob 儲存體掛接為檔案系統For more information, see How to mount Blob storage as a file system with blobfuse.
  • Azure 資料箱服務可在因為要上傳大型資料集,或因網路限制而難以透過網路上傳資料時,將內部部署資料傳輸至 Blob 儲存體。Azure Data Box service is available to transfer on-premises data to Blob storage when large datasets or network constraints make uploading data over the wire unrealistic. 根據您的資料大小,您可以向 Microsoft 要求 Azure 資料箱磁碟Azure 資料箱Azure Data Box HeavyDepending on your data size, you can request Azure Data Box Disk, Azure Data Box, or Azure Data Box Heavy devices from Microsoft. 接著,您可以將資料複製到這些裝置,並將其寄回給 Microsoft,以上傳至 Blob 儲存體。You can then copy your data to those devices and ship them back to Microsoft to be uploaded into Blob storage.
  • Azure 匯入/匯出服務提供一種方便的方式,可讓您使用自行提供的硬碟在儲存體帳戶中匯入或匯出大量資料。The Azure Import/Export service provides a way to import or export large amounts of data to and from your storage account using hard drives that you provide. 如需詳細資訊,請參閱使用 Microsoft Azure 匯入/匯出服務將資料移轉至 Blob 儲存體For more information, see Use the Microsoft Azure Import/Export service to transfer data to Blob storage.

後續步驟Next steps