Always On Availability Group Backup on Secondary
先講結論:
1.因為在次要節點的Full backup只能用copy_only,所以,基底備份的Full Backup只能在主要節點執行
2.然後如果你期望每一台節點的維護計畫都一樣,並且在failover後都還能執行主要節點的備份作業,此時就要將Backup Preference改為Primary了,這樣所有備份(Full,Diff,log backup)都會在主要節點執行
3.如果你期望Log Backup可以改道次要節點執行,每個節點的維護計畫就不會都一樣,需各自設定,也就是failover後,需要手動調整維護計畫
次要節點備份的用途:
1.Backup Preference是為了讓Log Backup可以在次要節點執行,讓主要節點減少一些負擔。
2.在次要節點只能用Copy_Only的方式執行Full Backup。
3.在次要節點不支援差異備份 Differentialj Backup
Backup Type | Primary Replica | Secondary Replica (Synchronous and Asynchronous) |
Full | Yes | Yes but with Copy_Only option) |
Log | Yes | Yes (we cannot take log backup with COPY_ONLY on secondary replica) |
Differential | Yes | No |
SQL Server Always ON Availability Group Log Backup on Secondary Replicas (sqlshack.com)
Any Replica:
依照優先權設定,優先高的成為prefer replica,除非前一個複本不可使用,後面複本才會遞補成為refer replica。
如果遇到優先權相同,將依照複本伺服器名稱字母排序優先權
select CASE ags.primary_replica WHEN ar.replica_server_name THEN 'PRIMARY' ELSE 'SECONDARY' END replica_type, ar.replica_server_name, ar.backup_priority, CASE WHEN backup_priority > 0 THEN 'INCLUDED' ELSE 'EXCLUDED' END used_for_backup from sys.availability_replicas ar join sys.dm_hadr_availability_group_states ags ON ags.group_id = ar.group_id order by ar.backup_priority desc, ar.replica_server_name;
沒有留言:
張貼留言