Backing Up Mirrored Databases
Restrictions on Backup and Restore During Mirroring
While a database mirroring session is active, the following restrictions apply:
- Backup and restore of the mirror database are not allowed.
- Backup of the principal database is allowed, but BACKUP LOG WITH NORECOVERY is not allowed.
- Restoring the principal database is not allowed.
Prefer Secondary - This is the default. Backups should occur only on a secondary replica, which allows backups to be taken on the primary replica if that is the only replica online.
Secondary - Only All automatic backups occur on secondary replicas. Backups should not be taken if the primary replica is the only replica online.
- Primary Backups should always be taken on the primary replica allowing for differential backups to be taken.
Any Replica Backups can occur on any replica in the availability group. Automated backups use the backup priority setting applied in the preference when choosing a replica as the target for a backup.
ALTER AVAILABILITY GROUP [<myAvailabilityGroup_name>] SET ( AUTOMATED_BACKUP_PREFERENCE = SECONDARY_ONLY );