使用 Microsoft Azure Blob 儲存體服務進行 SQL Server 備份及還原SQL Server Backup and Restore with Microsoft Azure Blob Storage Service

適用於: 是SQL Server 是Azure SQL Database (僅限受控執行個體) 否Azure Synapse Analytics (SQL DW) 否平行處理資料倉儲 APPLIES TO: yesSQL Server yesAzure SQL Database (Managed Instance only) noAzure Synapse Analytics (SQL DW) noParallel Data Warehouse

備份至 Azure Blob 圖形Backup to Azure blob graphic

本主題說明 SQL ServerSQL Server 如何備份到 Microsoft Azure BLOB 儲存體服務,以及如何從該服務進行還原。This topic introduces SQL ServerSQL Server backups to and restoring from the Microsoft Azure Blob storage service. 本主題也會提供使用 Microsoft Azure Blob 服務來儲存 SQL ServerSQL Server 備份的優點摘要。It also provides a summary of the benefits of using the Microsoft Azure Blob service to store SQL ServerSQL Server backups.

SQL Server 可以下列方式將備份儲存到 Microsoft Azure BLOB 儲存體服務:SQL Server supports storing backups to the Microsoft Azure Blob storage service in the following ways:

  • 管理針對 Microsoft Azure 所進行的備份: 相同的方式也可用於備份到磁碟和磁帶。現在只要指定 URL 作為備份目的地,即可備份至 Microsoft Azure 儲存體。Manage your backups to Microsoft Azure: Using the same methods used to backup to DISK and TAPE, you can now back up to Microsoft Azure storage by specifying URL as the backup destination. 一如您對於本機儲存體或其他異地選項的處理方式,您可以使用此功能手動備份或設定您自己的備份策略。You can use this feature to manually backup or configure your own backup strategy like you would for a local storage or other off-site options. 此功能又稱為 SQL Server 備份至 URLThis feature is also referred to as SQL Server Backup to URL. 如需詳細資訊,請參閱< SQL Server Backup to URL>。For more information, see SQL Server Backup to URL. SQL Server 2012 SP1 CU2 或更新版本皆提供此功能。This feature is available in SQL Server 2012 SP1 CU2 or later. SQL Server 2016 (13.x)SQL Server 2016 (13.x) 已增強這項功能,透過使用區塊 Blob、共用存取簽章和等量配置,提升效能和功能。This feature has been enhanced in SQL Server 2016 (13.x)SQL Server 2016 (13.x) to provide increased performance and functionality through the use of block blobs, Shared Access Signatures, and striping.

    注意

    若是使用 SQL Server 2012 SP1 CU2 之前的 SQL Server 版本,則可使用 Microsoft Azure 工具的 SQL Server 備份增益集,快速而輕鬆地建立要儲存到 Microsoft Azure 儲存體的備份。For SQL Server versions previous to SQL Server 2012 SP1 CU2, you can use the add-in SQL Server Backup to Microsoft Azure Tool to quickly and easily create backups to Microsoft Azure storage. 如需詳細資訊,請參閱< 下載中心>。For more information, see download center.

  • Azure Blob 儲存體中資料庫檔案的檔案快照集備份 :透過使用 Azure 快照集, SQL ServerSQL Server 檔案快照集備份可針對使用 Azure Blob 儲存體服務儲存的資料庫檔案,提供幾乎即時的備份和還原。File-Snapshot Backups for Database Files in Azure Blob Storage Through the use of Azure snapshots, SQL ServerSQL Server File-Snapshot Backups provide nearly instantaneous backups and restores for database files stored using the Azure Blob storage service. 這個功能可讓您簡化備份和還原原則,並支援還原時間點。This capability enables you to simplify your backup and restore policies, and it supports for point in time restore. 如需詳細資訊,請參閱 Azure 中資料庫檔案的檔案快照集備份For more information, see File-Snapshot Backups for Database Files in Azure. SQL Server 2016 或更新版本皆提供此功能。This feature is available in SQL Server 2016 or later.

  • 讓 SQL Server 管理針對 Microsoft Azure 所進行的備份: 設定 SQL Server 以管理單一資料庫或多個資料庫的備份策略與排程備份,或是在執行個體層級設定預設值。Let SQL Server Manage backups to Microsoft Azure: Configure SQL Server to manage the backup strategy and schedule backups for a single database, or several databases, or set defaults at the instance level. 此功能又稱為 SQL Server Managed Backup to Microsoft AzureSQL Server Managed Backup to Microsoft AzureThis feature is referred to as SQL Server Managed Backup to Microsoft AzureSQL Server Managed Backup to Microsoft Azure. 如需詳細資訊,請參閱 SQL Server Managed Backup to Microsoft AzureFor more information see SQL Server Managed Backup to Microsoft Azure. SQL Server 2014 或更新版本皆提供此功能。This feature is available in SQL Server 2014 or later.

使用 Microsoft Azure Blob 服務進行 SQL ServerSQL Server 備份的優點Benefits of Using the Microsoft Azure Blob Service for SQL ServerSQL Server Backups

  • 彈性、可靠且無限制的異地儲存體:將您的備份儲存在 Microsoft Azure Blob 服務上是一種方便、彈性且容易存取的異地選項。Flexible, reliable, and limitless off-site storage: Storing your backups on Microsoft Azure Blob service can be a convenient, flexible, and easy to access off-site option. 針對您的 SQL ServerSQL Server 備份建立異地儲存體就像修改現有的指令碼/作業一樣簡單。Creating off-site storage for your SQL ServerSQL Server backups can be as easy as modifying your existing scripts/jobs. 異地儲存體通常應該遠離實際執行資料庫位置,防止單一災害同時影響異地和實際執行資料庫位置。Off-site storage should typically be far enough from the production database location to prevent a single disaster that might impact both the off-site and production database locations. 透過選擇異地備援 Blob 儲存體,您就可以在發生可能影響整個地區的災害時,獲得一層額外的保護。By choosing to geo replicate the Blob storage you have an extra layer of protection in the event of a disaster that could affect the whole region. 此外,您可以隨時隨地取得備份,輕鬆地針對還原作業進行存取。In addition, backups are available from anywhere and at any time and can easily be accessed for restores.

    重要

    透過使用 SQL Server 2016 (13.x)SQL Server 2016 (13.x)中的區塊 Blob,您可以將備份組等量配置以支援高達 12.8 TB 的備份檔案大小。Through the use of block blobs in SQL Server 2016 (13.x)SQL Server 2016 (13.x), you can stripe your backup set to support backup files sizes up to 12.8 TB.

  • 備份封存:Microsoft Azure Blob 儲存體服務能提供較佳的替代方案,來取代經常用來封存備份的磁帶選項。Backup Archive: The Microsoft Azure Blob Storage service offers a better alternative to the often used tape option to archive backups. 磁帶儲存體可能需要實際運輸至異地設施並採取措施來保護媒體。Tape storage might require physical transportation to an off-site facility and measures to protect the media. 將您的備份儲存在 Microsoft Azure Blob 儲存體中,即可提供立即、高可用性且耐用的封存選項。Storing your backups in Microsoft Azure Blob Storage provides an instant, highly available, and a durable archiving option.

  • 沒有硬體管理的負擔:Microsoft Azure 服務不會產生任何硬體管理的負擔。No overhead of hardware management: There is no overhead of hardware management with Microsoft Azure services. Microsoft Azure 服務會管理硬體並提供異地複寫,以進行備援,防止硬體故障。Microsoft Azure services manage the hardware and provide geo-replication for redundancy and protection against hardware failures.

  • 目前,對於在 Microsoft Azure 虛擬機器中執行的 SQL ServerSQL Server 執行個體而言,備份至 Microsoft Azure Blob 儲存體服務可以透過建立附加磁碟來完成。Currently for instances of SQL ServerSQL Server running in a Microsoft Azure Virtual Machine, backing up to Microsoft Azure Blob storage services can be done by creating attached disks. 不過,您可以附加至 Microsoft Azure 虛擬機器的磁碟數目有所限制。However, there is a limit to the number of disks you can attach to a Microsoft Azure Virtual Machine. 超大執行個體的限制為 16 個磁碟,而較小執行個體的限制則更低。This limit is 16 disks for an extra large instance and fewer for smaller instances. 只要啟用直接備份至 Microsoft Azure Blob 儲存體的功能,您就可以忽略 16 個磁碟的限制。By enabling a direct backup to Microsoft Azure Blob Storage, you can bypass the 16 disk limit.

    此外,目前儲存在 Microsoft Azure Blob 儲存體服務中的備份檔案可以直接提供給內部部署 SQL ServerSQL Server ,或在 Microsoft Azure 虛擬機器中執行的其他 SQL ServerSQL Server 使用,完全不需要進行資料庫附加/卸離,或是下載並附加 VHD。In addition, the backup file which now is stored in the Microsoft Azure Blob storage service is directly available to either an on-premises SQL ServerSQL Server or another SQL ServerSQL Server running in a Microsoft Azure Virtual Machine, without the need for database attach/detach or downloading and attaching the VHD.

  • 成本效益:只有使用的服務才要付費。Cost Benefits: Pay only for the service that is used. 成為符合成本效益的異地與備份封存選項。Can be cost-effective as an off-site and backup archive option. 如需詳細資訊和連結,請參閱 Microsoft Azure 計費考量 一節。See the Microsoft Azure Billing Considerations section for more information and links.

Microsoft Azure 計費考量:Microsoft Azure Billing Considerations:

了解 Microsoft Azure 儲存體成本可讓您預測在 Microsoft Azure 中建立和儲存備份的成本。Understanding Microsoft Azure storage costs enables you to forecast the cost of creating and storing backups in Microsoft Azure.

Microsoft Azure 定價計算機 可以協助您預估成本。The Microsoft Azure pricing calculator can help estimate your costs.

儲存體: 費用是根據使用的空間收費,而計算方式則是採累進費率和備援層級計算。Storage: Charges are based on the space used and are calculated on a graduated scale and the level of redundancy. 如需詳細資料與最新資訊,請參閱 定價詳細資料 文章的 資料管理 一節。For more details, and up-to-date information, see the Data Management section of the Pricing Details article.

資料轉送: 針對 Microsoft Azure 的輸入資料轉送是免費的。Data Transfers: Inbound data transfers to Microsoft Azure are free. 輸出傳輸則必須支付頻寬使用量的費用,計算方式是根據地區特定的累進費率計算。Outbound transfers are charged for the bandwidth use and calculated based on a graduated region-specific scale. 如需詳細資料,請參閱<定價詳細資料>文章的 資料傳輸 一節。For more details, see the Data Transfers section of the Pricing Details article.

另請參閱See Also

SQL Server 備份至 URL 的最佳作法和疑難排解SQL Server Backup to URL Best Practices and Troubleshooting

系統資料庫的備份與還原 (SQL Server)Back Up and Restore of System Databases (SQL Server)

教學課程:搭配使用 Microsoft Azure Blob 儲存體服務和 SQL Server 2016 資料庫Tutorial: Using the Microsoft Azure Blob storage service with SQL Server 2016 databases

SQL Server 備份至 URLSQL Server Backup to URL