Veritas NetBackup™ for Microsoft SQL Server Administrator's Guide
- Introducing NetBackup for SQL Server
- Installing NetBackup for SQL Server
- Instance Management for SQL Server Intelligent Policies
- Viewing the SQL Server instances and instance groups in instance management
- About registering SQL Server instances
- Configuring SQL Server backups with SQL Server Intelligent Policy
- Configuring NetBackup for SQL Server
- Performing restores of SQL Server
- Redirecting a SQL Server database to a different host
- Restoring multistreamed SQL Server backups
- Protecting SQL Server data with VMware backups
- About protecting SQL Server data with VMware backups
- Using NetBackup for SQL Server with Snapshot Client
- Using copy-only snapshot backups to affect how differentials are based
- About SQL Server agent grouped backups (legacy SQL Server policies)
- Protecting SQL Server in high availability (HA) environments
- About using NetBackup to protect SQL Server availability groups
- About protecting the preferred replica in a SQL Server availability group (legacy backup policies)
- About protecting a specific node in a SQL Server availability group
- About NetBackup for SQL Server with database mirroring
- Backup and recovery concepts
- Overview of SQL Server backup and recovery concepts
- About recovery factors for SQL Server
- Using NetBackup for SQL Server with multiple NICs
- Configuring backups with legacy SQL Server policies using clients and batch files
- About using batch files with NetBackup for SQL Server
- About schedule properties
- Backing up read-only filegroups
- Performing user-directed operations with dbbackex
- Using bplist to retrieve a list of SQL Server backups
- SQL Server backups and restores in an SAP environment (legacy SQL Server policies)
- About SQL Server backups and restores in an SAP environment
- Troubleshooting
- About debug logging for SQL Server troubleshooting
- Disaster recovery of a SQL Server
- Appendix A. Sample batch files
- About sample backup batch files for legacy SQL Server policies
- About sample restore batch files
- About sample backup batch files for legacy SQL Server policies
- Appendix B. Multiplexed backups
- Appendix C. Register authorized locations
Creating batch files for the policy that protects the preferred replica
This topic describes how to create batch files for the backup policies that protect the availability group (AG). These batch files also use the PREFERREDREPLICA keyword so that NetBackup protects the SQL Server preferred replica.
To create the batch files for an AG, you must log on to each node separately. Then use the NetBackup MS SQL Client to create the batch files on each node.
To create batch files for the policy that protects the preferred replica
- This procedure assumes that you already created a separate policy for each type of backup that you want to perform.
- Perform steps 3 to 14 in this procedure on each node in the AG.
You must log on to each node separately and create the batch files from that node. This way the batch files have the correct settings for each node. Backups may fail if you create a batch file on one node and copy it to the other nodes in the AG.
- Log on to one of the nodes in the AG.
- Open the NetBackup MS SQL Client.
- Select File > Set SQL Server connection properties.
- From the Instance drop-down list, select the instance that hosts the AG.
- Select File > Backup SQL Server objects.
- Select the objects you want to backup in one of the following ways:
Select one or more databases, filegroups, or files.
To back up all databases, including the system databases (DATABASE $ALL), select the instance. From the Back up group, select All.
- Select the Type of Backup and any other settings.
- In the NetBackup Policy field, enter the name of the MS-SQL Server policy that you created.
- From the Backup script group, select Save.
- Click Backup and open the batch file.
- For each operation in the batch file, add the keyword PREFERREDREPLICA TRUE.
This keyword instructs NetBackup to perform the backup only on the preferred replica and not all the nodes in the AG.
- Save and close the batch file.
Note the location of the batch file. Save the batch file for each node to the same file location. This way you only need to enter one file location for the batch file in the Backup Selections list.
- Repeat steps 7 to 14 for any other types of backups that you want to perform. For example, full, full differential, or transaction log.
More information is available on how to create batch files.
- Repeat the steps in this procedure (steps 3 to 15) to create batch files for the other AG nodes.
- When you have created batch files for all the nodes in the AG, add the batch files to the policies that you created previously.
See Adding the batch files to the policy that protects the preferred replica.