Site icon Database Tutorials

How To Backup Only Availability Group Databases in an Instance

 

Sometimes we need to take backups on an AG basis. Finding databases that are included in individual AG and getting their individual backups will make our job more difficult.

With the help of the following script you can get the backup of the databases that are included in an AG using Cursor.

You must write the name of your availability group in place of AGNAME in Scrpt.

In Script, it takes backups into “C:\Backup” folder. Here you can change the folder to receive backup.

 

Exit mobile version