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

Azure Synapse 专用 SQL 池中的备份和还原Backup and restore in Azure Synapse Dedicated SQL pool

了解如何在 Azure Synapse 专用 SQL 池中使用备份和还原。Learn how to use backup and restore in Azure Synapse Dedicated SQL pool. 使用专用 SQL 池还原点可以恢复或复制主要区域中旧状态的数据仓库。Use dedicated SQL pool restore points to recover or copy your data warehouse to a previous state in the primary region. 使用数据仓库异地冗余备份可还原到不同的地理区域。Use data warehouse geo-redundant backups to restore to a different geographical region.

什么是数据仓库快照What is a data warehouse snapshot

数据仓库快照会创建一个还原点,利用该还原点可将数据仓库恢复或复制到以前的状态。A data warehouse snapshot creates a restore point you can leverage to recover or copy your data warehouse to a previous state. 由于专用 SQL 池是一个分布式系统,因此数据仓库快照包含许多位于 Azure 存储中的文件。Since dedicated SQL pool is a distributed system, a data warehouse snapshot consists of many files that are located in Azure storage. 快照捕获数据仓库中存储的数据的增量更改。Snapshots capture incremental changes from the data stored in your data warehouse.

数据仓库还原是基于现有数据仓库或已删除数据仓库的还原点创建的新数据仓库。A data warehouse restore is a new data warehouse that is created from a restore point of an existing or deleted data warehouse. 还原数据仓库是任何业务连续性和灾难恢复策略的基本组成部分,因为数据库还原可以在意外损坏或删除数据后重新创建数据。Restoring your data warehouse is an essential part of any business continuity and disaster recovery strategy because it re-creates your data after accidental corruption or deletion. 此外,数据仓库是出于测试或开发目的创建数据仓库副本的强大机制。Data warehouse is also a powerful mechanism to create copies of your data warehouse for test or development purposes. 专用 SQL 池还原速度因数据库大小以及源和目标数据仓库的位置而异。Dedicated SQL pool restore rates can vary depending on the database size and location of the source and target data warehouse.

自动还原点Automatic Restore Points

快照是用于创建还原点的内置功能。Snapshots are a built-in feature that creates restore points. 无需启用此功能。You do not have to enable this capability. 但是,专用 SQL 池应处于活动状态才能创建还原点。However, the dedicated SQL pool should be in an active state for restore point creation. 如果它频繁暂停,则可能不会创建自动还原点,因此请确保在暂停专用 SQL 池之前创建用户定义的还原点。If it is paused frequently, automatic restore points may not be created so make sure to create user-defined restore point before pausing the dedicated SQL pool. 用户目前无法删除自动还原点,因为服务使用这些还原点来维护 SLA 以进行恢复。Automatic restore points currently cannot be deleted by users as the service uses these restore points to maintain SLAs for recovery.

系统会全天捕获数据仓库的快照,创建可以使用七天的还原点。Snapshots of your data warehouse are taken throughout the day creating restore points that are available for seven days. 无法更改此保留期。This retention period cannot be changed. 专用 SQL 池支持八小时恢复点目标 (RPO)。Dedicated SQL pool supports an eight-hour recovery point objective (RPO). 可以根据过去七天捕获的任意一个快照,还原主要区域中的数据仓库。You can restore your data warehouse in the primary region from any one of the snapshots taken in the past seven days.

若要查看上一个快照的启动时间,可对联机专用 SQL 池运行此查询。To see when the last snapshot started, run this query on your online dedicated SQL pool.

select   top 1 *
from     sys.pdw_loader_backup_runs
order by run_id desc

用户定义的还原点User-Defined Restore Points

使用此功能,可以在大型修改之前和之后手动触发快照,以便创建数据仓库的还原点。This feature enables you to manually trigger snapshots to create restore points of your data warehouse before and after large modifications. 此功能可确保在出现工作负荷中断或用户错误的情况下,还原点在逻辑上是一致的,这样可以提供额外的数据保护,缩短恢复时间。This capability ensures that restore points are logically consistent, which provides additional data protection in case of any workload interruptions or user errors for quick recovery time. 用户定义的还原点可以使用七天,然后系统会替你将它自动删除。User-defined restore points are available for seven days and are automatically deleted on your behalf. 无法更改用户定义的还原点的保留期。You cannot change the retention period of user-defined restore points. 无论在任何时间点,均会保证 42 个用户定义的还原点,因此,它们必须在创建另一个还原点之前 删除42 user-defined restore points are guaranteed at any point in time so they must be deleted before creating another restore point. 可以通过 PowerShell 或 Azure 门户触发快照来创建用户定义的还原点。You can trigger snapshots to create user-defined restore points through PowerShell or the Azure portal.


如需将还原点保留 7 天以上,请在此处为此功能投票。If you require restore points longer than 7 days, please vote for this capability here. 此外,可以创建用户定义的还原点,然后从新建的还原点还原到新数据仓库。You can also create a user-defined restore point and restore from the newly created restore point to a new data warehouse. 还原后,你将拥有专用的 SQL 池,并可将其无限期暂停以节省计算成本。Once you have restored, you have the dedicated SQL pool online and can pause it indefinitely to save compute costs. 暂停的数据库按 Azure 高级存储费率收取存储费用。The paused database incurs storage charges at the Azure Premium Storage rate. 如需已还原数据仓库的活动副本,可以执行恢复,只需花费几分钟时间。If you need an active copy of the restored data warehouse, you can resume which should take only a few minutes.

还原点保留期Restore point retention

下面列出了还原点保留期的详细信息:The following lists details for restore point retention periods:

  1. 专用 SQL 池会在达到 7 天保留期并且总共至少有 42 个还原点(包括用户定义的还原点和自动还原点)时删除还原点。Dedicated SQL pool deletes a restore point when it hits the 7-day retention period and when there are at least 42 total restore points (including both user-defined and automatic).
  2. 暂停专用 SQL 池时不会创建快照。Snapshots are not taken when a dedicated SQL pool is paused.
  3. 还原点的存在时长是从创建还原点的时间算起的绝对日历天数(包括 SQL 池暂停的时间)。The age of a restore point is measured by the absolute calendar days from the time the restore point is taken including when the SQL pool is paused.
  4. 在任何时间点,专用 SQL 池均保证能够存储最多 42 个用户定义的还原点和 42 个自动还原点,只要这些还原点尚未达到 7 天保留期的限制At any point in time, a dedicated SQL pool is guaranteed to be able to store up to 42 user-defined restore points and 42 automatic restore points as long as these restore points have not reached the 7-day retention period
  5. 如果创建了快照,然后专用 SQL 池暂停 7 天以上的时间,然后进行了恢复,那么还原点会持续存在,直到总共有 42 个还原点(包括用户定义的还原点和自动还原点)If a snapshot is taken, the dedicated SQL pool is then paused for greater than 7 days, and then resumed, the restore point will persist until there are 42 total restore points (including both user-defined and automatic)

删除 SQL 池时的快照保留Snapshot retention when a SQL pool is dropped

删除专用 SQL 池时,系统会创建最终的快照并将其保存七天。When you drop a dedicated SQL pool, a final snapshot is created and saved for seven days. 可以将专用 SQL 池还原至删除时所创建的最终还原点。You can restore the dedicated SQL pool to the final restore point created at deletion. 如果专用 SQL 池是在暂停状态下删除的,则不会创建快照。If the dedicated SQL pool is dropped in a paused state, no snapshot is taken. 在这种情况下,请确保在删除专用 SQL 池之前创建用户定义的还原点。In that scenario, make sure to create a user-defined restore point before dropping the dedicated SQL pool.


如果删除托管专用 SQL 池的服务器/工作区,则属于该服务器/工作区的所有数据库也会被删除且无法恢复。If you delete the server/workspace hosting a dedicated SQL pool, all databases that belong to the server/workspace are also deleted and cannot be recovered. 无法还原已删除的服务器。You cannot restore a deleted server.

异地备份和灾难恢复Geo-backups and disaster recovery

每日在配对的数据中心创建一次异地备份。A geo-backup is created once per day to a paired data center. 异地还原的 RPO 为 24 小时。The RPO for a geo-restore is 24 hours. 可以将异地备份还原到支持专用 SQL 池的任何其他区域的服务器。You can restore the geo-backup to a server in any other region where dedicated SQL pool is supported. 使用异地备份可在无法访问主要区域中的还原点时还原数据仓库。A geo-backup ensures you can restore data warehouse in case you cannot access the restore points in your primary region.

如果你不需要专用 SQL 池的异地备份,则可以禁用它们并节省灾难恢复存储成本。If you do not require geo-backups for your dedicated SQL pool, you can disable them and save on disaster recovery storage costs. 为此,请参阅 操作方法指南:禁用专用 sql 池的异地备份 (以前的 SQL DW) To do so, refer to How to guide: Disable geo-backups for a dedicated SQL pool (formerly SQL DW). 请注意,如果禁用异地备份,则在主 Azure 数据中心不可用时,将无法将专用 SQL 池恢复到配对的 Azure 区域。Note that if you disable geo-backups, you will not be able to recover your dedicated SQL pool to your paired Azure region if your primary Azure data center is unavailable.


如果希望异地备份的 RPO 更短,请在此处为此功能投票。If you require a shorter RPO for geo-backups, vote for this capability here. 此外,可以创建用户定义的还原点,然后从新建的还原点还原到其他区域中的新数据仓库。You can also create a user-defined restore point and restore from the newly created restore point to a new data warehouse in a different region. 还原后,数据仓库将会联机,可以无限期将其暂停,以节省计算成本。Once you have restored, you have the data warehouse online and can pause it indefinitely to save compute costs. 暂停的数据库按 Azure 高级存储费率收取存储费用。The paused database incurs storage charges at the Azure Premium Storage rate. 如需数据仓库的活动副本,可以执行恢复,只需花费几分钟时间。Should you need an active copy of the data warehouse, you can resume which should take only a few minutes.

数据驻留Data residency

如果配对的数据中心位于地理边界之外,则可以通过在异地冗余存储中进行选择来确保你的数据保留在地理边界内。If your paired data center is located outside of your geographical boundary, you can ensure that your data stays within your geographical boundary by opting out of geo-redundant storage. 此操作可通过异地冗余存储选项 (以前的 sql DW) 预配到 (以前的 SQL DW) 创建或还原专用 sql DW 时完成。This can be done when provisioning your dedicated SQL pool (formerly SQL DW) through the geo-redundant storage option when creating or restoring a dedicated SQL pool (formerly SQL DW).

若要确认配对的数据中心是否在不同的国家/地区,请参阅 Azure 配对区域To confirm that your paired data center is in a different country, refer to Azure Paired Regions.

备份和还原成本Backup and restore costs

Azure 帐单上将列出存储的明细项目,以及灾难恢复存储的明细项目。You will notice the Azure bill has a line item for Storage and a line item for Disaster Recovery Storage. 存储费用是在主要区域中存储数据的费用加上快照捕获增量更改的费用。The storage charge is the total cost for storing your data in the primary region along with the incremental changes captured by snapshots. 有关快照收费方式的更详细说明,请参阅了解快照如何收取费用For a more detailed explanation of how snapshots are charged, refer to Understanding how Snapshots Accrue Charges. 异地冗余费用是指存储异地备份的费用。The geo-redundant charge covers the cost for storing the geo-backups.

主数据仓库和 7 天快照更改的总费用根据 TB 数的舍入近似值计算。The total cost for your primary data warehouse and seven days of snapshot changes is rounded to the nearest TB. 例如,如果数据仓库为 1.5 TB,快照捕获了 100 GB,则会根据 Azure 高级存储费率计收 2 TB 数据的费用。For example, if your data warehouse is 1.5 TB and the snapshots captures 100 GB, you are billed for 2 TB of data at Azure Premium Storage rates.

如果使用的是异地冗余存储,则会单独收取异地存储费。If you are using geo-redundant storage, you receive a separate storage charge. 异地冗余存储按标准的读取访问异地冗余存储 (RA-GRS) 费率计费。The geo-redundant storage is billed at the standard Read-Access Geographically Redundant Storage (RA-GRS) rate.

有关 Azure Synapse 定价的详细信息,请参阅 Azure Synapse 定价For more information about Azure Synapse pricing, see Azure Synapse pricing. 跨区域还原时,不会对数据流出量收费。You are not charged for data egress when restoring across regions.

从还原点还原Restoring from restore points

每个快照创建一个代表快照开始时间的还原点。Each snapshot creates a restore point that represents the time the snapshot started. 如果要还原数据仓库,请选择一个还原点,并发出还原命令。To restore a data warehouse, you choose a restore point and issue a restore command.

可以保留还原的数据仓库和当前的数据仓库,也可以删除其中一个。You can either keep the restored data warehouse and the current one, or delete one of them. 如果希望使用已还原数据仓库替换当前数据仓库,可使用 ALTER DATABASE 的 MODIFY NAME 选项将其重命名。If you want to replace the current data warehouse with the restored data warehouse, you can rename it using ALTER DATABASE with the MODIFY NAME option.

若要还原数据仓库,请参阅还原专用 SQL 池To restore a data warehouse, see Restore a dedicated SQL pool.

若要还原已删除或已暂停的数据仓库,则可以创建支持票证To restore a deleted or paused data warehouse, you can create a support ticket.

跨订阅还原Cross subscription restore

如果需要在订阅之间直接还原,请在 此处投票此功能。If you need to directly restore across subscription, vote for this capability here. 还原到不同的服务器,并跨订阅 "移动" 服务器以执行跨订阅还原。Restore to a different server and 'Move' the server across subscriptions to perform a cross subscription restore.

异地冗余还原Geo-redundant restore

可以将专用 SQL 池还原到支持所选性能级别的专用 SQL 池的任何区域。You can restore your dedicated SQL pool to any region supporting dedicated SQL pool at your chosen performance level.


若要执行异地冗余还原,不能选择退出此功能。To perform a geo-redundant restore you must not have opted out of this feature.

后续步骤Next steps

有关还原点的详细信息,请参阅用户定义的还原点For more information about restore points, see User-defined restore points