Veritas NetBackup™ for Microsoft SQL Server Administrator's Guide
- Introducing NetBackup for SQL Server
- Installation and host configuration
- Host configuration and job settings
- Managing SQL Server objects for use with SQL Server Intelligent Policies
- About discovery of SQL Server objects
- About registering SQL Server instances and availability replicas
- Registering instances or availability replicas with an instance group
- Configuring backups with SQL Server Intelligent Policy
- About tuning parameters for SQL Server backups
- Performing restores of SQL Server
- Redirecting a SQL Server database to a different host
- Protecting SQL Server data with VMware backups
- About protecting an application database with VMware backups
- Configuring backups 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 availability groups
- Protecting SQL Server availability groups with intelligent policies
- Protecting SQL Server availibility groups with legacy policies
- 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 (legacy backup policies)
- About protecting the preferred replica in a SQL Server availability group (legacy backup policies)
- Protecting SQL Server in a cluster environment
- Configuring backups with legacy SQL Server policies using clients and batch files
- About using batch files with NetBackup for SQL Server
- About schedule properties
- Performing user-directed backups of SQL Server databases
- Performing user-directed backups of read-only filegroups
- Using NetBackup for SQL Server with multiple NICs
- Performance and troubleshooting
- About debug logging for SQL Server troubleshooting
- About disaster recovery of SQL Server
- Appendix A. Other configurations
- About SQL Server backups and restores in an SAP environment
- Appendix B. Register authorized locations
Creating batch files for the policy that protects the preferred or the primary replica
This topic describes how to create batch files for the backup policies that protect the availability group. These batch files can use either the PREFERREDREPLICA PREFERRED or PREFERREDREPLICA PRIMARY to protect either the preferred or the primary replica.
To create the batch files for an availability group, you must log on to each replica separately. Then use the NetBackup MS SQL Client to create the batch files on each replica.
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 replica in the availability group.
You must log on to each replica separately and create the batch files from that replica. This way the batch files have the correct settings for each node. Backups may fail if you create a batch file on one replica and copy it to the other replicas in the availability group.
- Log on to one of the replicas in the availability group.
- 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 availability group.
- 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 configure one of the following options:
To protect the preferred replica, add the keyword PREFERREDREPLICA PREFERRED.
To protect the primary replica, add the keyword PREFERREDREPLICA PRIMARY.
- Save and close the batch file.
Note the location of the batch file. Save the batch file for each replica 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, 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 availability group replicas.
- When you have created batch files for all the replicas on which you want backups to occur, add the batch files to the policies that you created previously.
See Adding the batch files to the policy that protects the preferred or the primary replica.