Backup Maintenance Plan for Secondary read only replica for Always Availability Group

SGH 1,221 Reputation points

Is it recommended to back up Maintenance Plan for Secondary read only replica for Always Availability Group. We have configured for the Primary Replica.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,675 questions
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,552 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Ronen Ariely 15,096 Reputation points

    Good day

    Adding to what was told already, I recommend to check this tutorial:

    In general, performing backups on a secondary replica is recommended in many cases. You should configure the AUTOMATED_BACKUP_PREFERENCE and BACKUP_PRIORITY parameters and you need to configure backup jobs for every availability database on every server instance that hosts an availability replica that is a candidate for performing backups.

    Check out this document as well:

    1 person found this answer helpful.
    0 comments No comments

  2. Erland Sommarskog 100.9K Reputation points MVP

    What is the question? Whether you should also backup the secondary? Logically, it is the same database, so there is little point in it. And something in the back of my head tells me that you cannot even take a full backup on a secondary, but I may recall incorrectly.

    However, keep in mind that tomorrow the roles may have reversed, so that the machine which now hosts your secondary will host the primary, and in this case you should have backups running on this machine.

  3. AmeliaGu-MSFT 13,961 Reputation points Microsoft Vendor

    Hi @SGH ,

    Even if the secondary is read only replica, we can schedule backup from the Maintenance Plan section right?

    Yes, you can.
    But there are some limitations to take backup Maintenance Plan on Secondary Replicas:

    • BACKUP DATABASE supports only copy-only full backups of databases, files, or filegroups when it is executed on secondary replicas. Note that copy-only backups do not impact the log chain or clear the differential bitmap.
    • Differential backups are not supported on secondary replicas.
    • BACKUP LOG supports only regular log backups (the COPY_ONLY option is not supported for log backups on secondary replicas).
    • A consistent log chain is ensured across log backups taken on any of the replicas (primary or secondary), irrespective of their availability mode (synchronous-commit or asynchronous-commit).
    • To back up a secondary database, a secondary replica must be able to communicate with the primary replica and must be SYNCHRONIZED or SYNCHRONIZING.

    And to configure backup on secondary replicas, you need to Always On High Availability node and the Availability Groups node-> Availability Group Properties->Backup Preferences page, change it to Prefer Secondary or Secondary only.
    Please refer to this doc for more details.
    Best Regards,

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

  4. Erland Sommarskog 100.9K Reputation points MVP

    Amelia's reply sums up what your options are. But I like to reiterate: you secondary will not remain a secondary forever. One day it will become the primary (because else why did you create an availability group). So you need to have a backup plan where you have an unbroken chain of full and log backups, so that you can recover from a disaster.

    0 comments No comments