Backup on Distributed AG setup
0
votes
2
answers
1060
views
I have setup a distibruted availability group and trying to understand behaviour of backups on it. While I can take backup from primary replica of Primary AG, I can not take backup from primary replica from Secondary(Forwarder) AG. MS documentation says I should be able to.
> In a distributed availability group, backups can be performed on secondary replicas in the same availability group as the active primary replica, **or on the primary replica of any secondary availability groups**. Backups cannot be performed on a secondary replica in a secondary availability group because secondary replicas only communicate with the primary replica in their own availability group. Only replicas that communicate directly with the global primary replica can perform backup operations.
Backup Command
BACKUP DATABASE [mydb] TO DISK = 'C:\TEMP\mydb_Full.BAK' WITH COMPRESSION
Error I am getting is -
Msg 3059, Level 16, State 1, Line 1
This BACKUP or RESTORE command is not supported on a database mirror or secondary replica.
Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.
Is this bug or I am misunderstanding something?
Backup preference is set to 'Primary' on both AG.
select sys.fn_hadr_backup_is_preferred_replica('mydb')
returns '1' on primary replicas of both Availability groups.
Asked by GAURAV RATHOD
(186 rep)
May 24, 2022, 08:56 AM
Last activity: Dec 6, 2024, 07:03 PM
Last activity: Dec 6, 2024, 07:03 PM