可用性组&辅助备份 [英] Availability group & backups from secondary

查看:71
本文介绍了可用性组&辅助备份的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

推荐答案


您的理解是正确的。一旦日志备份在任何副本上完成,备份LSN将传送到所有其他副本,并且截断点将根据最后一个活动LSN确定。因此,当您尝试对其进行日志备份时,
辅助节点上的事务日志的非活动部分将被截断。

Your understanding is correct. Once the log backup finishes on any replica, the backup LSN is communicated to all other replicas and the truncation point is determined based on the last active LSN. Thus, the inactive portion of the transaction log on the secondary will have truncated by the time you attempt to take a log backup on it.

您运行的日志备份然后,辅助节点将覆盖自主节点上次上次日志备份以来的更改。换句话说,备份之间没有重叠的变化。它只是形成一个日志备份链,无论您运行日志备份的副本是什么。 

The log backup that you run on the secondary would then cover the changes since the last log backup taken on the primary. In other words, there is no overlap of changes between the backups. It simply forms a log backup chain regardless of the replica you run the log backup on. 

您现在可能正在考虑在两个副本上同时运行日志备份时间,好吧,AG有办法防止这种情况发生。启动备份时,它确保没有其他副本同时备份同一个数据库(它通过获取数据库上的BulkOp锁来执行
)。 

You might now be thinking to run log backups across both replicas at the same time, well, AG has a way to prevent that from happening. When a backup is started, it makes sure that no other replica is backing up the same database at the same time (it does so by acquiring BulkOp lock on the DB). 

解决这个问题的一种方法是操作第三方工具运行的SQL脚本,以便在主数据库上进行日志传送。您可以添加具有"镜像"的逻辑。日志备份的副本,即使日志备份写入两个位置。但是
然后我不确定你是否可以使该工具只压缩常规备份副本并留下你打算用于数据仓库的那个。

One way you can get around this is by manipulating the SQL script the third-party tool runs for log shipping on the primary. You can add the logic to have "Mirrored" copies of the log backup i.e. to make the log backup write to two places. But then I am not sure if you can make the tool to only compress the regular backup copy and leave the one you intend to use for your Data Warehouse.


这篇关于可用性组&辅助备份的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆