Skip to main content
Answer

MS SQL AG, run a copy- only backup of an AG DB on specific replica?

  • April 22, 2022
  • 4 replies
  • 864 views

RubeckDK
Novice
Forum|alt.badge.img+9

Hi..

Sorry if this is a stupid question but how do I run a copy- only backup of an AG DB on a replica of my own choice?
When trying to run them locally on a replica, the AG DBs are skipped...... Setting the additional setting, nBackupAGDBsViaActualInstance with an value of '1' doesn't seems to make a difference either.
AG DBs are still being "Skipped from collect".. 

 

The "Offload full backup job to secondary replica" found in the Command Center doesn't seem to let me specify on which replica to run the backup.. 

 

So how do I do this...?

 

CVLT version: v11.24.29.

 

Thank you,..

 

Best regards
RubeckDK

Best answer by Orazan

The preferred replica is a setting within SQL not within Commvault.  You set it in the properties of the database.

 

If you have a question or comment, please create a topic

4 replies

Forum|alt.badge.img+15
  • Vaulter
  • April 22, 2022

Good morning.  Please see this resource on configuring Copy Only backups for SQL AGs:

https://documentation.commvault.com/11.24/essential/128397_configuring_copy_only_backups_on_availability_group_instances.html

 

A copy only backup can be run on any secondary replica.


RubeckDK
Novice
Forum|alt.badge.img+9
  • Author
  • Novice
  • April 22, 2022

Hi @Orazan 

 

I’ve already checked that link… 

A copy only backup can be run on any secondary replica.

But how do I specify on which replica I want to run it?  (Got an AG here that consists of both physical and virtual nodes… I would like to make sure that the backup runs on one of the physical ones)

 

/RubeckDK


Forum|alt.badge.img+15
  • Vaulter
  • Answer
  • April 22, 2022

The preferred replica is a setting within SQL not within Commvault.  You set it in the properties of the database.

 


RubeckDK
Novice
Forum|alt.badge.img+9
  • Author
  • Novice
  • April 22, 2022

Hi @Orazan 

 

Thank you for your input…… Much appreciated 

 

I was provided with a test cluster by our SQL geeks, so I could test out on how this works.. It seems that the “"Offload full backup job to secondary replica" setting doesn’t have any effect at all until the SQL admin has configured it within SQL too…  In this scenario the primary was still used for the backup UNTIL the SQL admin set the backup preference setting to “Prefer Secondary”. Then the backup started using a replica…   Turning off “"Offload full backup job to secondary replica” made the primary to be used again, even though the backup preference setting is set to “Prefer secondary”..    

In some previous SP/FR, running a backup directly on a AG node would back up the AG DBs too if not setting the “nBackupAGDBsViaActualInstance” setting to ‘0’….     

 

Anyway, I’ve now figured it out and can move on… :-) Thanks again.. 

 

/RubeckDK