Forum Discussion

zahidashrafece's avatar
9 years ago

Transaction logs Backup when DB is in "AlWAYS ON" mode through Netbackup

Hello

We have a request for configuring SQL Backups in Netbackup . We configured it through script in netbackup version 7.7.1 . FULL/INC backups are running fine but when comes to transection logs backups is failing with below error . 

DB's are in always on mode.

Is there any way to take the backups of transection log when they are in always on mode

ERROR:

02/23/2016 17:06:38 - Info bphdb (pid=15792) Backup started
02/23/2016 17:06:38 - connected; connect time: 0:00:00
02/23/2016 17:06:43 - Info dbclient (pid=19088) INF - ERROR - Database <**Daatabase name**> is hosted on a non-readable replica of the availability group. NetBackup does not support backups of databases on non-readable replicas. To back up the databases on this replica, enable user connections for this replica.
02/23/2016 17:06:48 - Info dbclient (pid=19088) INF - OPERATION #1 of batch C:\SQL_all_TxLgbu_script.bch FAILED with STATUS 1 (0 is normal). Elapsed time = 6(6) seconds.
02/23/2016 17:06:52 - Info dbclient (pid=19088) INF - Results of executing <C:\SQL_all_TxLgbu_script.bch>: 
02/23/2016 17:06:52 - Info dbclient (pid=19088) <0> operations succeeded. <1> operations failed.
02/23/2016 17:06:53 - Info dbclient (pid=19088) INF - The following object(s) were not backed up successfully.

  • I am reading the following in  NetBackup 7.7.1 for Microsoft SQL Server Administrator's Guide  :
    (Just a few extracts - more info in the manual)

    p.120:

    NetBackup can protect HA environments with SQL Server legacy backup policies. These environments include SQL Server AlwaysOn Availability Groups (AGs), SQL Server clusters, database mirroring, and log-shipping.

    Note: SQL Server AGs, SQL Server clusters, and database mirroring are not supported for SQL Server Intelligent Policy. Log-shipping environments are supported, but with the same caveats as for legacy SQL Server policies. See “Configuring NetBackup to support database log-shipping” on page 147.

    p.121:

    About using NetBackup to protect SQL Server availability groups

    NetBackup supports backups of AGs with legacy backup policies (with clients and batch files). Intelligent Policies do not support AG backups at this time.
    ■ You can protect an AG environment with a policy that protects the preferred replica or a policy that protects a specific node in the AG. See “About protecting the preferred replica in a SQL Server availability group” on page 122. See “About protecting a specific node in a SQL Server availability group” on page 127.

    p. 122:

    ■ Backups of non-readable secondary replicas
    NetBackup can only back up databases in a replica when you allow user connections for the replica.
    If a secondary replica is the preferred replica and it is non-readable, the backup fails. If a secondary replica is not the preferred replica, NetBackup skips the backup of that replica.

    ■ SQL Server does not support the following types of backups on a secondary replica:
    ■ Full backups If a full backup takes place on a secondary replica, NetBackup converts the full backup to a copy-only backup.
    ■ Differential backups Backups of this type result in a failed backup.
    ■ Copy-only transaction log backups Backups of this type result in a failed backup.

    About protecting the preferred replica in a SQL Server availability group

    In the backup batch file that you create use the PREFERREDREPLICA TRUE keyword, which honors your SQL Server backup preferences. These preferences include the preferred replica, backup priority, and excluded replicas. Include this keyword in each backup operation in the batch file.
    ■ NetBackup backs up the preferred replica, as determined by SQL Server. NetBackup can only fully protect the AG environment if the backup policy includes each node in the AG in the Clients list. Also, all batch files in the Backup Selections list must exist on all the AG nodes.

    (Detailed info in the manual)

2 Replies

  • I am reading the following in  NetBackup 7.7.1 for Microsoft SQL Server Administrator's Guide  :
    (Just a few extracts - more info in the manual)

    p.120:

    NetBackup can protect HA environments with SQL Server legacy backup policies. These environments include SQL Server AlwaysOn Availability Groups (AGs), SQL Server clusters, database mirroring, and log-shipping.

    Note: SQL Server AGs, SQL Server clusters, and database mirroring are not supported for SQL Server Intelligent Policy. Log-shipping environments are supported, but with the same caveats as for legacy SQL Server policies. See “Configuring NetBackup to support database log-shipping” on page 147.

    p.121:

    About using NetBackup to protect SQL Server availability groups

    NetBackup supports backups of AGs with legacy backup policies (with clients and batch files). Intelligent Policies do not support AG backups at this time.
    ■ You can protect an AG environment with a policy that protects the preferred replica or a policy that protects a specific node in the AG. See “About protecting the preferred replica in a SQL Server availability group” on page 122. See “About protecting a specific node in a SQL Server availability group” on page 127.

    p. 122:

    ■ Backups of non-readable secondary replicas
    NetBackup can only back up databases in a replica when you allow user connections for the replica.
    If a secondary replica is the preferred replica and it is non-readable, the backup fails. If a secondary replica is not the preferred replica, NetBackup skips the backup of that replica.

    ■ SQL Server does not support the following types of backups on a secondary replica:
    ■ Full backups If a full backup takes place on a secondary replica, NetBackup converts the full backup to a copy-only backup.
    ■ Differential backups Backups of this type result in a failed backup.
    ■ Copy-only transaction log backups Backups of this type result in a failed backup.

    About protecting the preferred replica in a SQL Server availability group

    In the backup batch file that you create use the PREFERREDREPLICA TRUE keyword, which honors your SQL Server backup preferences. These preferences include the preferred replica, backup priority, and excluded replicas. Include this keyword in each backup operation in the batch file.
    ■ NetBackup backs up the preferred replica, as determined by SQL Server. NetBackup can only fully protect the AG environment if the backup policy includes each node in the AG in the Clients list. Also, all batch files in the Backup Selections list must exist on all the AG nodes.

    (Detailed info in the manual)