azure备份存储层分类_如何配置Azure SQL数据库长期保留(LTR)备份

azure备份存储层分类

In this article, we will review default backup settings, long-term retention (LTR) backups in Azure SQL database and how-to setup long-term retention (LTR) backup policy in Azure SQL database using Azure portal.

在本文中,我们将回顾默认备份设置,Azure SQL数据库中的长期保留(LTR)备份以及如何使用Azure门户在Azure SQL数据库中设置长期保留(LTR)备份策略。

The database backups are automatically managed in Azure. Azure takes a full backup of your database every week, differential backups every 12 hours and transaction log backup every five-ten minutes. These backups are replicated to the paired data center to protect backups in case of an outage in the primary data center. The retention period of these backups files is based on the service level you choose while creating the database in Azure. If you choose basic tier the backups up to 7 days old are stored. If you choose standard or premium tier the backups up to 35 days old are stored.

数据库备份在Azure中自动进行管理。 Azure每周都会对数据库进行一次完整备份,每12小时进行一次差异备份,每五到十分钟进行一次事务日志备份。 这些备份将复制到配对的数据中心,以在主数据中心发生故障时保护备份。 这些备份文件的保留期取决于您在Azure中创建数据库时选择的服务级别。 如果选择基本层,则备份最多可保存7天。 如果选择标准层或高级层,则最多可以存储35天的备份。

With Azure SQL database backups, you can restore the database to a point in time with a different database name on the same Logical SQL Server based on the retention period.

使用Azure SQL数据库备份,您可以根据保留期限,在同一Logical SQL Server上使用其他数据库名称将数据库还原到一个时间点。

Azure SQL数据库中的时间点还原 (The point in time restore in Azure SQL database)

We can restore the Azure SQL database to point in time within the retention period. For example, the database with a backup retention period of 7 days can be restored to any point within 7 days. The database with a backup retention period of 35 days can be restored to any point within 35 days.

我们可以将Azure SQL数据库还原到保留期内的时间点。 例如,可以将备份保留期为7天的数据库还原到7天内的任何时间点。 备份保留期为35天的数据库可以在35天内还原到任何点。

To restore the database using the Azure portal, log in to the Azure portal and navigate to ‘All resources’. Click on the Azure SQL database that you are going to restore point in time. Please refer to the below image.

若要使用Azure门户还原数据库,请登录到Azure门户并导航到“所有资源”。 单击要还原的时间点的Azure SQL数据库。 请参考下图。

Azure SQL database

In the database details page, Click on Restore as shown in the below image.

在数据库详细信息页面中,单击还原 ,如下图所示。

point in time restore in Azure SQL database

Select the source as the point in time. we cannot restore the database backup to the existing database in Azure SQL Server. The database can be restored only as a new database. Enter the new database name. The oldest restore point is shown just below the database name. We cannot restore the database to a state that is before the oldest restore point. Enter the restore point, the time is in UTC time zone.

选择源作为时间点。 我们无法将数据库备份还原到Azure SQL Server中的现有数据库。 该数据库只能作为新数据库还原。 输入新的数据库名称。 最旧的还原点显示在数据库名称的正下方。 我们无法将数据库还原到最早的还原点之前的状态。 输入还原点,时间为UTC时区。

The target server is locked out as we can restore the database backup which creates a new database on the same logical SQL Server. Click on OK to restore the database with the specified database name on the same logical SQL Server.

目标服务器已被锁定,因为我们可以还原数据库备份,从而在同一逻辑SQL Server上创建新数据库。 单击“ 确定”以在同一逻辑SQL Server上使用指定的数据库名称还原数据库。

point in time restore in Azure SQL database

Azure SQL数据库中的长期保留(LTR)备份 (Long-term retention (LTR) backups in Azure SQL database)

In some cases, we may need a backup of the database that is longer than the default retention period. This is due to the regulatory, compliance of the applications. Long-term retention (LTR) backup is a feature in Azure to store the full backups up to 10 years. Long-term retention (LTR) backups can be configured on a single Azure SQL database or elastic pool.

在某些情况下,我们可能需要比默认保留期更长的数据库备份。 这归因于应用程序的法规遵从性。 长期保留(LTR)备份是Azure的一项功能,可以存储完整备份长达10年。 可以在单个Azure SQL数据库或弹性池上配置长期保留(LTR)备份。

Log in to the Azure portal and click on the logical SQL Server that has the database on which you are going to configure long-term retention (LTR) backup policy.

登录到Azure门户,然后单击具有要在其上配置长期保留(LTR)备份策略的数据库的逻辑SQL Server。

In the server details page, click on Manage backups. Select the database and click on Configure retention.

在服务器详细信息页面中,单击管理备份 。 选择数据库,然后单击“ 配置保留”

long-term retention backups in Azure SQL Server

long-term retention policy

In the configure policies pane, select weekly LTR backups if you want to retain weekly full backups and specify the retention period of the weekly backups. i.e. one backup from each week is copied to different long-term blob storage.

如果要保留每周完整备份,然后在“配置策略”窗格中选择“每周LTR备份”,并指定每周备份的保留期。 即,每周一次的备份将被复制到不同的长期Blob存储中。

Select Monthly LTR backups to copy one backup from the first week of every month to long-term storage.

选择“每月LTR备份”将一个备份从每月的第一周复制到长期存储中。

Select Yearly LTR backup and specify the week number to copy one full backup of Azure SQL database in the specified week of the year to the long-term storage.

选择“年度LTR备份”,然后指定星期几,以将一年中指定的一周中的一次Azure SQL数据库完整备份复制到长期存储中。

These backups are stored in the long-term storage based on the retention period you specified while creating the retention policy. In case if the database is geo-replicated or part of auto-failover groups, configure long-term retention backups with the same settings on the secondary database.

这些备份根据您在创建保留策略时指定的保留期限存储在长期存储中。 如果数据库是地理复制的或属于自动故障转移组的一部分,请在辅助数据库上配置具有相同设置的长期保留备份。

恢复长期保留(LTR)备份 (Restore long-term retention (LTR) backup )

Restoring the long-term retention (LTR) backup is like restoring the Azure SQL database to point time using Azure automatic backups.

还原长期保留(LTR)备份就像使用Azure自动备份还原Azure SQL数据库以指出时间一样。

Log in to the Azure portal and click on the database you want to restore. In the database details page, click on Restore. Select the source as long-term backup retention as shown in the below image, enter the name of the new database and select the backup from the list of the available backups. Click on OK to restore. Once you click on OK, a new database with the specified name is created on the same logical SQL Server.

登录到Azure门户,然后单击要还原的数据库。 在数据库详细信息页面中,单击还原 。 选择源作为长期备份保留,如下图所示,输入新数据库的名称,然后从可用备份列表中选择备份。 单击确定进行还原。 单击“ 确定”后,将在同一逻辑SQL Server上创建具有指定名称的新数据库。

restore long-term retention backup

结论 (Conclusion)

In this article, we explored the default backup retention period in the Azure SQL database, point in time restore of Azure SQL databases using automated backups, and long-term retention (LTR) backups on the database. In case you have any questions, please feel free to ask in the comment section below.

在本文中,我们探讨了Azure SQL数据库中的默认备份保留期,使用自动备份对Azure SQL数据库进行时间点还原以及对数据库的长期保留(LTR)备份。 如果您有任何疑问,请随时在下面的评论部分中提问。

翻译自: https://www.sqlshack.com/how-to-configure-azure-sql-database-long-term-retention-ltr-backups/

azure备份存储层分类

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值