Using Secondary Replica to perform a Copy-Only Backup

  • I'm using Ola Halengren's backup  code. I have a two node AG. I am taking Monthly and Yearly Backups and want to offload the Copy-Only Backups to my Secondary Replica. I have AG set up to do backups on the Primary Replica. The job on the secondary replica is using Ola's backups sproc. When I run the copy-only backup, nothing happens. The backup is not created and I don't really get an error. Is there a parameter(@AvailabilityGroupReplicas) that I need to tell it what node to do the backup.

  • How are the backups set up in the AG confiratiopn?


    This setting overrides that


    Override the backup preference for availability groups. This option only applies to copy-only full backups and regular transaction log backups.




    Override the backup preference for availability groups.


    Do not override the backup preference for availability groups. This is the default.

    Michael L John
    If you assassinate a DBA, would you pull a trigger?
    To properly post on a forum:

  • You need to set the backup preference and backup priority of the availability group so that the secondary is higher than primary, then Ola's scripts will see the preferred replica is the secondary and allow backups to run on secondary.


    Ensure your licensed right though as it all changed again with 2019 and if you need Enterprise & Software Assurance to be able to offload that maintenance task with no additional cost for the secondary.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply