NetBackup105_AdminGuide_Sybase
NetBackup105_AdminGuide_Sybase
Administrator's Guide
Release 10.5
NetBackup™ for Sybase Administrator's Guide
Last updated: 2024-09-20
Legal Notice
Copyright © 2024 Veritas Technologies LLC. All rights reserved.
Veritas, the Veritas Logo, Veritas Alta, and NetBackup are trademarks or registered trademarks
of Veritas Technologies LLC or its affiliates in the U.S. and other countries. Other names may
be trademarks of their respective owners.
This product may contain third-party software for which Veritas is required to provide attribution
to the third party (“Third-party Programs”). Some of the Third-party Programs are available
under open source or free software licenses. The License Agreement accompanying the
Software does not alter any rights or obligations you may have under those open source or
free software licenses. Refer to the Third-party Legal Notices document accompanying this
Veritas product or available at:
https://www.veritas.com/about/legal/license-agreements
The product described in this document is distributed under licenses restricting its use, copying,
distribution, and decompilation/reverse engineering. No part of this document may be
reproduced in any form by any means without prior written authorization of Veritas Technologies
LLC and its licensors, if any.
The Licensed Software and Documentation are deemed to be commercial computer software
as defined in FAR 12.212 and subject to restricted rights as defined in FAR Section 52.227-19
"Commercial Computer Software - Restricted Rights" and DFARS 227.7202, et seq.
"Commercial Computer Software and Commercial Computer Software Documentation," as
applicable, and any successor regulations, whether delivered by Veritas as on premises or
hosted services. Any use, modification, reproduction release, performance, display or disclosure
of the Licensed Software and Documentation by the U.S. Government shall be solely in
accordance with the terms of this Agreement.
http://www.veritas.com
Technical Support
Technical Support maintains support centers globally. All support services will be delivered
in accordance with your support agreement and the then-current enterprise technical support
policies. For information about our support offerings and how to contact Technical Support,
visit our website:
https://www.veritas.com/support
You can manage your Veritas account information at the following URL:
https://my.veritas.com
If you have questions regarding an existing support agreement, please email the support
agreement administration team for your region as follows:
Japan [email protected]
Documentation
Make sure that you have the current version of the documentation. Each document displays
the date of the last update on page 2. The latest documentation is available on the Veritas
website:
https://sort.veritas.com/documents
Documentation feedback
Your feedback is important to us. Suggest improvements or report errors or omissions to the
documentation. Include the document title, document version, chapter title, and section title
of the text on which you are reporting. Send feedback to:
You can also see documentation information or ask a question on the Veritas community site:
http://www.veritas.com/community/
https://sort.veritas.com/data/support/SORT_Data_Sheet.pdf
Contents
About the backup, restore, and load scripts for NetBackup for Sybase
on UNIX .............................................................................. 27
Modifying the backup script for NetBackup for Sybase on UNIX
..................................................................................... 28
Example sybase_mydb_backup.cmd script for NetBackup .............. 29
Modifying the restore script for NetBackup for Sybase on UNIX
..................................................................................... 32
Example of a sybase_mydb_restore script ................................... 32
About the backup, restore, and load scripts for NetBackup for Sybase
on Windows ......................................................................... 34
Modifying the backup script for NetBackup for Sybase on Windows
..................................................................................... 35
sybase_mdb_backup.cmd script ................................................ 35
Additional information for editing the backup script for NetBackup
for Sybase on Windows ..................................................... 38
Modifying the restore script for NetBackup for Sybase on Windows
..................................................................................... 39
sybase_mydb_restore.cmd script example for NetBackup ............... 40
Additional information for editing the restore script for NetBackup
for Sybase on Windows ..................................................... 41
Modifying the NetBackup for Sybase load script .................................. 42
NetBackup for Sybase environment variables ..................................... 43
NetBackup for Sybase configuration or bp.conf file settings ................... 44
Creating a $SYBASE_HOME/bp.conf file on the UNIX client ........... 45
Specifying options in /usr/openv/netbackup/bp.conf on the UNIX
client .............................................................................. 46
Configuring the logon account for the NetBackup Client Service for
NetBackup for Sybase ............................................................ 46
About striped dumps and loads with NetBackup for Sybase .................. 47
Example Sybase scripts for striped dumps and loads ..................... 47
NetBackup for Sybase multiplexing considerations - duplicating
tapes ............................................................................. 48
NetBackup for Sybase multiplexing considerations - using more
than 12 stripes ................................................................. 49
Reviewing the auto-discovered mappings .......................................... 49
About permissions for NetBackup for Sybase log files (UNIX) ................ 52
Configuring the Maximum jobs per client ........................................... 52
Perform a manual backup .............................................................. 53
Feature Description
Media and device All the devices supported by Media Manager are available to
management NetBackup for Sybase.
Scheduling facilities NetBackup scheduling facilities on the primary server can be used
to schedule automatic and unattended Sybase backups.
This feature also lets you choose the times when these operations
can occur. For example, to prevent interference with normal daytime
operations, you can schedule your database backups to occur only
at night.
Multiplexed backups NetBackup for Sybase lets you take advantage of NetBackup’s
and restores multiplexing capabilities. Multiplexing directs multiple data streams
to one backup device, thereby reducing the time necessary to
complete the operation.
Transparent Sybase All backups and restores run simultaneously and transparently
and regular file system without any action from the NetBackup administrator.
backup and restore
The database administrator can run database backup and restore
operations
operations through NetBackup. An administrator or any other
authorized user can use NetBackup to run database backups and
restores.
Sharing the same It is possible to share the same devices and media that is used for
storage units that are other backups or to give Sybase exclusive use of certain devices
used for other file and media. NetBackup for Sybase can use Media Manager, disk,
backups and Media Server Deduplication Pool (MSDP) storage units.
Centralized and From the NetBackup primary server, you can schedule database
networked backup backups or start them manually for any client. The Sybase
operations databases can also reside on hosts that are different from the
devices on which NetBackup stores the backups.
■ NetBackup web UI
Parallel backup and NetBackup for Sybase supports the parallel backup and restore
restore operations capabilities of the Sybase backup server. For example, this permits
the user to run more than one tape device at a time for a single
Sybase backup or restore, thereby reducing the time necessary to
complete the operation.
Term Meaning
SQL Server and SQL Server improves the backup and restore functions of Sybase
Sybase backup server backup server by using remote procedure calls (RPCs) to instruct
Sybase backup server to back up or restore specific databases.
SQL Server DUMP and These SQL Server commands are used for Sybase database
LOAD commands backups and restores. The DUMP command is used to back up. The
LOAD command is used to restore.
Archive device This dump device is used with the DUMP and LOAD commands. It
is required to support integration with NetBackup for Sybase.
Sybase backup scripts Shell scripts that control NetBackup for Sybase operations.
Sybase SQL script An SQL script that contains SQL commands to be performed by
Sybase SQL Server.
Network (TCP/IP)
NetBackup software:
the dump image. Sybase backup server then handles all data transfer for the
operation.
For more information on SQL Server and Sybase backup server, see your Sybase
documentation.
See “NetBackup for Sybase overview” on page 9.
See “NetBackup for Sybase technical overview” on page 11.
See “Sequence of operation for NetBackup for Sybase backups” on page 12.
See “About NetBackup for Sybase configuration” on page 19.
"sybackup::"
SQL Server and Sybase backup server do not have a backup-catalog feature.
However, when you perform a database or transaction dump, NetBackup for Sybase
automatically creates a file name for the dump image. You must then specify this
file name during a subsequent load operation.
The file naming convention for the database and transaction dumps is the following:
sql_server_name.database_name.backup_type.stripe_number.pid.dd-mm-yyyy.hh:mm:ss
SYBASE11.mydb.D.0.24312.17-12-2003.14:05:25
Introduction to NetBackup for Sybase 12
NetBackup for Sybase overview
Note: The Sybase backup server API does not support the remote Sybase backup
server feature. NetBackup controls all network communications.
Step 1 Verify the installation prerequisites. See “Verifying the operating system and platform
compatibility” on page 14.
http://www.netbackup.com/compatibility
Step 2 Verify that the primary server has a valid See “License for NetBackup for Sybase” on page 16.
license for NetBackup for Sybase and
any NetBackup options or add-ons.
Step 3 (UNIX) Specify the Sybase home path. See “Running the sybase_config script” on page 17.
Step 4 (UNIX) Add a new database instance. See “Adding new Sybase instances” on page 17.
Note: This step is required during installation and upgrade from an earlier
version of the NetBackup client.
■ About the backup, restore, and load scripts for NetBackup for Sybase on UNIX
■ About the backup, restore, and load scripts for NetBackup for Sybase on
Windows
■ Configuring the logon account for the NetBackup Client Service for NetBackup
for Sybase
Step 1 Configure a backup policy. See “About configuring a backup policy for Sybase ”
on page 20.
Step 2 Create backup scripts. See “About the backup, restore, and load scripts for
NetBackup for Sybase on UNIX ” on page 27.
Step 3 Edit Sybase environment variables. See “NetBackup for Sybase environment variables”
on page 43.
Step 4 Edit Sybase configuration files. See “ NetBackup for Sybase configuration or bp.conf
file settings” on page 44.
Step 5 (Windows) Configure the logon account for the See “Configuring the logon account for the NetBackup
NetBackup Client Service Client Service for NetBackup for Sybase ”
on page 46.
Step 6 Configure striped dumps and loads. See “About striped dumps and loads with NetBackup
for Sybase” on page 47.
Step 7 (UNIX and Linux) Configure the permissions for log See “About permissions for NetBackup for Sybase
files. log files (UNIX)” on page 52.
Step 8 Configure the Maximum jobs per client. See “Configuring the Maximum jobs per client”
on page 52.
Step 9 Test the configuration settings. See Perform a manual backup on page 53.
Configuring NetBackup for Sybase 20
About configuring a backup policy for Sybase
7 When you have added all the schedules, clients, and backup selections you
need, click Create.
Attribute Description
Policy type Determines the types of clients that can be backed up with the policy. For Sybase databases,
select the policy type Sybase.
Keyword phrase For NetBackup for Sybase, the Keyword phrase entry is ignored.
Schedule properties
This topic describes the schedule properties that have a different meaning for
database backups than for file system backups. Other schedule properties vary
according to your specific backup strategy and system configuration. Additional
information about other schedule properties is available. See the NetBackup
Administrator’s Guide, Volume I.
Property Description
Type of backup Specifies the type of backup that this schedule can control. The selection list shows only
the backup types that apply to the policy you want to configure.
Property Description
Schedule type You can schedule an automatic backup in one of the following ways:
■ Frequency
Frequency specifies the period of time that can elapse until the next backup operation
begins on this schedule. For example, assume that the frequency is 7 days and a
successful backup occurs on Wednesday. The next full backup does not occur until the
following Wednesday. Typically, incremental backups have a shorter frequency than full
backups.
■ Calendar
The Calendar option lets you schedule the backup operations that are based on specific
dates, recurring week days, or recurring days of the month.
Retention The retention period for an application backup schedule refers to the length of time that
NetBackup keeps backup images. The retention period for an automatic schedule controls
how long NetBackup keeps records of when scheduled backups occurred. For example, if
your database is backed up once every Sunday morning, you should select a retention
period of at least 2 weeks.
The type of schedule you select affects the retention period as follows:
■ Frequency-based scheduling
Set a retention period that is longer than the frequency setting for the schedule. For
example, if the frequency setting is set to one week, set the retention period to be more
than one week. The NetBackup scheduler compares the latest record of the automatic
backup schedule to the frequency of that automatic backup schedule. This comparison
is done to determine whether a backup is due. So if you set the retention period to expire
the record too early, the scheduled backup frequency is unpredictable. However, if you
set the retention period to be longer than necessary, the NetBackup catalog accumulates
unnecessary records.
■ Calendar-based scheduling
The retention period setting is not significant for calendar-based scheduling.
Multiple copies If you want to specify multiple copies of a backup for the policy, configure Multiple copies
on the application backup schedule. If using Snapshot Client, also specify Multiple copies
on the automatic schedule.
Automatic backup An automatic backup schedule specifies the dates and times for
NetBackup to automatically start backups. NetBackup runs the
scripts in the order that they appear in the file list. If there is more
than one client in the policy, the scripts are run on each client.
Table 3-5 Example settings for a NetBackup for Sybase application backup
schedule
Retention 2 weeks
00:08:00 - 22:00:00
Table 3-6 Example settings for a NetBackup for Sybase automatic backup
schedule
Retention 2 weeks
Note: If you installed NetBackup on more than one node in the Sybase cluster,
you must perform additional configuration.
See “Reviewing the auto-discovered mappings” on page 49.
5 Select Add.
Configuring NetBackup for Sybase 26
About configuring a backup policy for Sybase
/usr/openv/netbackup/ext/db_ext/backup.sh
C:\install_dir\dbext\backup.cmd
5 Click Add.
■ NetBackup installs sample scripts when you install the software; you can modify
these scripts for your own use. Write the scripts to a location outside of the
original installation location. This action ensures that future NetBackup upgrades
do not overwrite your site’s scripts.
See “About the backup, restore, and load scripts for NetBackup for Sybase on
Windows ” on page 34.
■ sybase_mydb_restore
■ sybase_mydb_load
The NetBackup for Sybase installation process writes these example scripts to the
following location:
/usr/openv/netbackup/ext/db_ext/sybase/scripts
Configuring NetBackup for Sybase 28
About the backup, restore, and load scripts for NetBackup for Sybase on UNIX
Each script can perform multiple Sybase backup server operations, but each type
of operation requires a separate script. For example, you need to use separate
scripts for backups versus restores.
The following topics show how to modify these scripts for your environment.
See “Modifying the backup script for NetBackup for Sybase on UNIX” on page 28.
See “Modifying the restore script for NetBackup for Sybase on UNIX ” on page 32.
See “Modifying the NetBackup for Sybase load script” on page 42.
See “NetBackup for Sybase environment variables” on page 43.
vi sybase_mydb_backup
4 Modify the sybase_mydb_backup script using the instructions in the script itself.
When customizing this script, note the following line:
#***************************************************************************
# Replace /usr/sybase12 below with the actual Sybase home directory
#***************************************************************************
SYBASE=/usr/sybase12
#***************************************************************************
# Replace SYBASE12 below with the actual name of the SQL Server
#***************************************************************************
SYBSERVER=SYBASE12
#***************************************************************************
# Replace SYB_DB below with the actual name of your Sybase database
#***************************************************************************
DATABASE_NAME=SYB_DB
#***************************************************************************
# Replace syb_files below with your actual name of the NetBackup
# server Policy to be used to backup the directory with Sybase script files
#***************************************************************************
SYB_FILES_POLICY=syb_files
#***************************************************************************
# Replace /usr/sybase12/scripts below with your actual path of the Sybase files
#***************************************************************************
SYB_FILES_DIR=/usr/sybase12/scripts
if [ ! -d "${SYBASE}"/ASE-12_0/ ]
then
#************** Sybase 11.9.2 or earlier *******************
ASE_QUAL=
OCS_QUAL=
else
Configuring NetBackup for Sybase 30
About the backup, restore, and load scripts for NetBackup for Sybase on UNIX
RETURN_STATUS=0
#***************************************************************************
# Replace "database_dump" below with your actual NetBackup schedule name
# which is used for a full backup of the Sybase database.
#***************************************************************************
if [ "${SYBACKUP_SCHED}" = "database_dump" ]
then
############# NetBackup has started a "database_dump" backup ##############
DUMP_TYPE=DATABASE
else
############# NetBackup has started a "transaction log" backup ##############
DUMP_TYPE=TRANSACTION
fi
#***************************************************************************
# Replace "Default-Application-Backup" below with your actual NetBackup
# Application Backup type schedule name for the Sybase database.
#***************************************************************************
echo dump $DUMP_TYPE $DATABASE_NAME to \"sybackup::-SERV $SYBACKUP_SERVER -POL
$SYBACKUP_POLICY -SCHED Default-Application-Backup\" > ./syb_${DATABASE_NAME}_dump
#**************************************************************************
# Remove the '#' from the beginning of the line below if you are going to
# use multiple stripes for the backup. Repeat this line for each stripe.
Configuring NetBackup for Sybase 31
About the backup, restore, and load scripts for NetBackup for Sybase on UNIX
#***************************************************************************
# Replace "manager" with your Sybase server Administrator's Password
#***************************************************************************
echo "$SYBASE$OCS_QUAL/bin/isql -Usa -Pmanager -I$SYBASE/interfaces -S$SYBSERVER
< ./syb_${DATABASE_NAME}_dump"
if [ "${DUMP_TYPE}" = "DATABASE" ]
then
# Initiate a backup of any file related to the Sybase database, such as script files.
if [ "$BPBACKUP_STATUS" -ne 0 ]
then
echo ""
echo "bpbackup of $SYB_FILES_DIR returned $BPBACKUP_STATUS"
fi
fi
exit $RETURN_STATUS
See “ NetBackup for Sybase configuration or bp.conf file settings” on page 44.
Configuring NetBackup for Sybase 32
About the backup, restore, and load scripts for NetBackup for Sybase on UNIX
vi sybase_mydb_restore
#***************************************************************************
# Replace /usr/sybase12 below with your actual Sybase home directory
#***************************************************************************
SYBASE=/usr/sybase12
#***************************************************************************
# Replace SYBASE12 below with your actual name of the SQL Server
Configuring NetBackup for Sybase 33
About the backup, restore, and load scripts for NetBackup for Sybase on UNIX
#***************************************************************************
SYBSERVER=SYBASE12
if [ ! -d "${SYBASE}"/ASE-12_0/ ]
then
#************** Sybase 11.9.2 or earlier **************
ASE_QUAL=
OCS_QUAL=
else
#************** Sybase 12.0 or later **************
SYBASE_ASE=ASE-12_0; export SYBASE_ASE
SYBASE_OCS=OCS-12_0; export SYBASE_OCS
ASE_QUAL=/$SYBASE_ASE
OCS_QUAL=/$SYBASE_OCS
fi
#***************************************************************************
# Replace /usr/openv/netbackup/ext/db_ext/sybase/scripts/sybase_mydb_load
# below with your actual SQL script path which contains corresponding
# LOAD commands
#***************************************************************************
LOADDB=/usr/openv/netbackup/ext/db_ext/sybase/scripts/sybase_mydb_load
RETURN_STATUS=0
#***************************************************************************
# Replace "manager" with your Sybase server Administrator's Password
#***************************************************************************
echo "$SYBASE$OCS_QUAL/bin/isql -Usa -Pmanager -I$SYBASE/interfaces -S$SYBSERVER < $LOADDB"
$SYBASE$OCS_QUAL/bin/isql -Usa -Pmanager -I$SYBASE/interfaces -S$SYBSERVER < $LOADDB
RETURN_STATUS=$?
exit $RETURN_STATUS
■ sybase_mydb_restore.cmd
■ sybase_mydb_load
The NetBackup for Sybase installation process writes these example scripts to the
following location:
install_path\NetBackup\dbext\sybase\samples
Each script can perform multiple Sybase backup server operations, but each type
of operation requires a separate script. For example, you need to use separate
scripts for backups versus restores.
The following sections show how to modify these scripts for your environment.
See “Modifying the backup script for NetBackup for Sybase on Windows”
on page 35.
See “sybase_mdb_backup.cmd script” on page 35.
See “Additional information for editing the backup script for NetBackup for Sybase
on Windows” on page 38.
See “Modifying the restore script for NetBackup for Sybase on Windows” on page 39.
See “sybase_mydb_restore.cmd script example for NetBackup” on page 40.
See “Additional information for editing the restore script for NetBackup for Sybase
on Windows” on page 41.
See “Modifying the NetBackup for Sybase load script” on page 42.
See “NetBackup for Sybase environment variables” on page 43.
Configuring NetBackup for Sybase 35
About the backup, restore, and load scripts for NetBackup for Sybase on Windows
sybase_mdb_backup.cmd script
The sybase_mydb_backup.cmd script is as follows:
@setlocal
@echo off
@REM **************************************************************************
Configuring NetBackup for Sybase 36
About the backup, restore, and load scripts for NetBackup for Sybase on Windows
@REM Replace C:\Sybase below with your actual Sybase home directory
@REM **************************************************************************
@set SYBASE=C:\Sybase
@REM **************************************************************************
@REM Replace Sybase below with the actual name of your SQL Server
@REM **************************************************************************
@set SYBSERVER=SYBASE
@REM **************************************************************************
@REM Replace SYB_DB below with the actual name of your Sybase database
@REM **************************************************************************
@set DATABASE_NAME=SYB_DB
:notsyb12
@REM ********* Sybase 11.9.2 or earlier **********
@set OCS_QUAL=
:cont1
@REM **************************************************************************
@REM These environment variables are set by NetBackup.
@REM **************************************************************************
@echo SYBACKUP_SERVER = %SYBACKUP_SERVER%
@echo SYBACKUP_POLICY = %SYBACKUP_POLICY%
@echo SYBACKUP_SCHED = %SYBACKUP_SCHED%
@echo SYBACKUP_SCHEDULED = %SYBACKUP_SCHEDULED%
@echo SYBACKUP_USER_INITIATED = %SYBACKUP_USER_INITIATED%
@REM **************************************************************************
@REM Replace "database_dump" below with your actual NetBackup schedule name
@REM which is used for a full backup of the Sybase database.
@REM **************************************************************************
if "%SYBACKUP_SCHED%" == "database_dump" goto dbdump
:dbdump
@REM *********** NetBackup has started a "database_dump" backup ***********
set DUMP_TYPE=DATABASE
:entercmd
@REM **************************************************************************
@REM Replace "Default-Application-Backup" below with your actual NetBackup
@REM Application Backup type schedule name for the Sybase database.
@REM **************************************************************************
@REM **************************************************************************
@REM Remove the REM from the beginning of the line below if you are going to
@REM use multiple stripes for the backup. Repeat this line for each stripe.
@REM Replace "Default-Application-Backup" below with your actual NetBackup
@REM Application Backup type schedule name for the Sybase database.
@REM **************************************************************************
@REM echo stripe on "sybackup::-SERV %SYBACKUP_SERVER% -POL %SYBACKUP_POLICY% -SCHED
Default-Application-Backup -STAT_FILE %STATUS_FILE%" >> .\syb_%DATABASE_NAME%_dump
@REM **************************************************************************
@REM Replace "manager" with your Sybase server Administrator's Password
@REM **************************************************************************
@echo %CMD_LINE%
%CMD_LINE%
@REM **************************************************************************
@REM This script will return an error status back to the NetBackup client if
Configuring NetBackup for Sybase 38
About the backup, restore, and load scripts for NetBackup for Sybase on Windows
:end
@echo on
@endlocal
See “ NetBackup for Sybase configuration or bp.conf file settings” on page 44.
@set SYBASE=C:\Sybase
Set this variable to the Sybase home folder. Typically set to the same value as the
SYBASE environment variable.
@set SYBSERVER=SYBASE
Set this variable to the name of the Sybase adaptive server. Typically set to the
same value as the DSQUERY environment variable.
@set DATABASE_NAME=SYB_DB
Replace database_dump with the Automatic Backup schedule name that is used
to schedule database dumps. You already configured this Automatic Backup
schedule.
See “About configuring a backup policy for Sybase ” on page 20.
This line builds the dump command that isql processes. Change the NetBackup
server name (%SYBACKUP_SERVER%), the Sybase policy name (%SYBACKUP_POLICY%),
and Application Backup schedule name (Default-Application-Backup) to fit your
environment. Do not change the name of the client status file (%STATUS_FILE%).
Replace manager with the adaptive server password for the administrator.
See “ NetBackup for Sybase configuration or bp.conf file settings” on page 44.
@setlocal
@echo off
@REM **************************************************************************
@REM Replace C:\Sybase below with your actual Sybase home directory
@REM **************************************************************************
@set SYBASE=C:\Sybase
@REM **************************************************************************
@REM Replace SYBASE below with the actual name of your SQL Server
@REM **************************************************************************
@set SYBSERVER=SYBASE
:notsyb12
@REM ********* Sybase 11.9.2 or earlier **********
@set OCS_QUAL=
:cont1
@REM **************************************************************************
@REM Replace ".\sybase_mydb_load" below with a full directory path only if
@REM the script file which contains the isql LOAD command is in a different
Configuring NetBackup for Sybase 41
About the backup, restore, and load scripts for NetBackup for Sybase on Windows
@echo %CMD_LINE%
%CMD_LINE%
@echo on
@endlocal
See “ NetBackup for Sybase configuration or bp.conf file settings” on page 44.
Additional information for editing the restore script for NetBackup for
Sybase on Windows
The following is additional information for editing the restore script.
@set SYBASE=C:\Sybase
Set this to the Sybase home folder. Typically set to the same value as the SYBASE
environment variable.
@set SYBSERVER=SYBASE
Set this to the name of the Sybase adaptive server. Typically set to the same value
as the DSQUERY environmental variable.
@set LOADDB=".\sybase_mydb_load"
Replace LOADDB with the full pathname of the script file that contains the Sybase
LOAD command. Perform this replacement only if the script file is in a directory that
is different from the one in which the sybase_mydb_restore script file resides.
Configuring NetBackup for Sybase 42
Modifying the NetBackup for Sybase load script
Replace manager with the adaptive server password for the administrator.
See “ NetBackup for Sybase configuration or bp.conf file settings” on page 44.
7 (Optional) Use the -SERV option to specify the NetBackup server on the device
string of the load command. The -SERV option, which in this example specifies
saturn, overrides any server that is specified in the NetBackup client
configuration. For example:
■ For Unix/Linux:
-PARENT_JOB_ID
${SYBACKUP_PARENT_JOBID}
■ For Windows:
-PARENT_JOB_ID
%SYBACKUP_PARENT_JOBID%
See “About the backup, restore, and load scripts for NetBackup for Sybase on
Windows ” on page 34.
See “About the backup, restore, and load scripts for NetBackup for Sybase on UNIX
” on page 27.
■ /usr/openv/netbackup/bp.conf
To edit this configuration, choose File > NetBackup Client Properties and click
on the Backups tab.
In case of conflicts, the order of precedence is as follows:
■ Command line options
■ Script variables
■ Environment variables
■ (UNIX clients) $USER/bp.conf
■ /usr/openv/netbackup/bp.conf (UNIX clients) or the NetBackup client
configuration (Windows clients)
■ Built-in variables
NetBackup uses a policy or schedule configured in the NetBackup client
configuration for all backups on the client, including file system and Sybase database
backups. For this reason, if a policy or schedule that is not a Sybase policy is
configured in the NetBackup client configuration, use the -POLICY and -SCHED
options on the Sybase DUMP command to specify the correct policy or schedule.
More information is available on how to specify a policy or schedule on the Sybase
DUMP command.
See “About the backup, restore, and load scripts for NetBackup for Sybase on
Windows ” on page 34.
If NetBackup fails to find policy and schedule definitions, NetBackup for Sybase
defaults to the first policy and schedule with the appropriate policy type.
The following topics explain how to enable the bp.conf files.
See “Creating a $SYBASE_HOME/bp.conf file on the UNIX client” on page 45.
See “Specifying options in /usr/openv/netbackup/bp.conf on the UNIX client”
on page 46.
Note: NetBackup uses the $SYBASE_HOME/bp.conf file only for Sybase policies.
Configuring NetBackup for Sybase 46
Configuring the logon account for the NetBackup Client Service for NetBackup for Sybase
/sybase/bp.conf
BPBACKUP_POLICY=policy_name
BPBACKUP_SCHED=schedule_name
policy_name Specify the name of the Sybase policy you want to use.
schedule_name Specify the name of the Application Backup schedule you want
to use.
$SYBASE_HOME=/sybase
See “ NetBackup for Sybase configuration or bp.conf file settings” on page 44.
SYSTEM account does not have permission to connect to the target database if you
use OS authentication instead of passwords.
If you use OS authentication, run the NetBackup client service under an account
that has SYSDBA privileges.
To configure the logon account for the NetBackup Client Service for
NetBackup for Sybase
1 In the Windows Services application, open the NetBackup Client Service
entry.
2 On the Log On tab, provide the following:
■ Type the account name with SYSDBA privileges.
■ Type the password.
The following is an example Sybase SQL load script for a Sybase striped load:
See “About striped dumps and loads with NetBackup for Sybase” on page 47.
See “NetBackup for Sybase multiplexing considerations - duplicating tapes”
on page 48.
See “NetBackup for Sybase multiplexing considerations - using more than 12 stripes”
on page 49.
See “About the backup, restore, and load scripts for NetBackup for Sybase on
Windows ” on page 34.
See “NetBackup for Sybase environment variables” on page 43.
Caution: NetBackup tape duplication must be performed with the multiplex option
when Sybase striping and the NetBackup multiplex (MPX) feature are used for a
Sybase backup. A problem occurs when multiple Sybase stripes are multiplexed
to a single tape and then the tape is duplicated without using the -mpx option. The
duplicated tape must be created with the -mpx option on the bpduplicate command.
This is also accessible as the Preserve multiplexing checkbox on the Duplicate
Backup Images window. In addition, all of the backups from the original Sybase
multiplexing session must be included in the duplicated multiplexed group.
See “NetBackup for Sybase multiplexing considerations - using more than 12 stripes”
on page 49.
See “Example Sybase scripts for striped dumps and loads” on page 47.
Configuring NetBackup for Sybase 49
Reviewing the auto-discovered mappings
/usr/openv/netbackup/db/config/NUMBER_DATA_BUFFERS_RESTORE
Windows:
install_path\NetBackup\db\config\NUMBER_DATA_BUFFERS_RESTORE
■ If the Sybase server is clustered, the host is associated with its node name and
the virtual name of the cluster.
These mappings are configured in the Security > Host mappings node in the
NetBackup web UI. You can also use the nbhostmgmt command to manage the
mappings. See the NetBackup Security and Encryption Guide and NetBackup Web
UI Administrator's Guide for more details.
client01.lab04.com client01
client01.lab04.com clustername
client01.lab04.com clustername.lab04.com
client02.lab04.com client02
client02.lab04.com clustername
client02.lab04.com clustername.lab04.com
4 Review the mappings for the host and click Approve if you want to use the
discovered mappings.
For example, if the following mappings are valid for client01.lab04.com, then
you approve them.
5 When you finish approving the valid mappings for the hosts, click on the Hosts
tab.
For hosts client01.lab04.com and client02.lab04.com, you see entries
for Mapped host or IP address that are similar to the following:
6 If you need to add a mapping that NetBackup did not automatically discover,
you can add it manually.
Table 3-8 Example mapped host names for a Sybase cluster environment
Cluster with two nodes Physical name of Node 1 Virtual name of Sybase server
Note: Enter a large enough value for the Maximum jobs per client attribute to
meet the number of jobs that Sybase runs. You may need to experiment with
different values at your site.
You can use the following formula to calculate a smaller value for the Maximum
jobs per client setting:
Maximum jobs per client = number_of_streams X number_of_policies
Refer to the following definitions:
number_of_streams The number of backup streams between the database server and
NetBackup. Each separate stream starts a new backup job on the client.
number_of_policies The number of policies of any type that can back up this client at the
same time. This number can be greater than one. For example, a client
can be in two policies to back up two different databases. These backup
windows can overlap.
guidelines on developing your own backup and recovery plan, refer to your Sybase
documentation.
The frequency of your backups determines how much work you can restore in the
event of a disaster. Dump each database immediately after you create it to provide
a base point, and then dump it on a fixed schedule thereafter.
The following is an example database backup strategy:
1 Perform a full database backup by running a database dump every Friday
night.
2 Back up your Sybase configuration files every Friday night at the same time
as the full-database backup.
Sybase recommends that you save all the Sybase scripts. This includes the
scripts that contain the disk init, create database, and alter database
commands.
Sybase also recommends that you save a hard copy of your sysdatabases,
sysusages, and sysdevices tables each time you issue one of these
commands. In addition, keep a copy of the syslogins.
3 Perform an incremental backup each night by running a transaction log dump.
See “About Sybase database backups” on page 54.
See “Modifying the backup script for NetBackup for Sybase on UNIX” on page 28.
See “Automatic backups of a Sybase database” on page 55.
For information on the isql utility and the DUMP command, see your Sybase
documentation.
See “Sybase backup strategy” on page 54.
See “About Sybase database backups” on page 54.
See “Browsing Sybase backups” on page 57.
Using NetBackup for Sybase 57
Browsing Sybase backups
root:<candytuft> % cd /usr/openv/netbackup/bin
root:<candytuft> % bplist -S candytuft -C copper -t 7 -R /
/sybase1200.esam.T.0.22448.26-10-2001.13:45:17
/sybase1200.model.D.0.21182.26-10-2001.12:56:40
/sybase1200.model.D.0.20730.26-10-2001.12:42:04
/sybase1200.model.D.0.20932.26-10-2001.12:33:02
/sybase1200.primary.D.1.20138.26-10-2001.07:25:57
/sybase1200.primary.D.2.19620.26-10-2001.07:25:57
/sybase1200.primary.D.3.20640.26-10-2001.07:25:57
/sybase1200.primary.D.0.19888.26-10-2001.07:25:57
/sybase1200.model.D.0.19092.26-10-2001.07:18:14
/sybase1192.model.D.0.4172.25-10-2001.07:17:20
root:<candytuft> %
Windows:
C:\>cd pro*
C:\Program Files>cd ver*
C:\Program Files\Veritas>cd net*
C:\Program Files\Veritas\NetBackup>cd bin
C:\Program Files\Veritas\NetBackup\bin>bplist -S candytuft -C copper -t 7 -R \
/sybase1200.esam.T.0.22448.26-10-2001.13:45:17
/sybase1200.model.D.0.21182.26-10-2001.12:56:40
/sybase1200.model.D.0.20730.26-10-2001.12:42:04
/sybase1200.model.D.0.20932.26-10-2001.12:33:02
/sybase1200.primary.D.1.20138.26-10-2001.07:25:57
/sybase1200.primary.D.2.19620.26-10-2001.07:25:57
/sybase1200.primary.D.3.20640.26-10-2001.07:25:57
/sybase1200.primary.D.0.19888.26-10-2001.07:25:57
/sybase1200.model.D.0.19092.26-10-2001.07:18:14
/sybase1192.model.D.0.4172.25-10-2001.07:17:20
C:\Program Files\Veritas\NetBackup\bin>
Using NetBackup for Sybase 58
About restoring a Sybase database
The -t 7 option on this command specifies the Sybase backups (dumps). The -R
on this command specifies a recursive listing.
For more information on this command, see the bplist(1M) man page or NetBackup
online help.
Note: NetBackup stores Sybase backups (dumps) in its catalog as dumpfile, but
when you specify a backup for the LOAD command, you must use dumpfile without
the slash /.
The procedure for restoring a Sybase database depends on the database involved
and the problems that you have on your system.
If the database and the device were lost, do the following:
■ Initialize a new device.
■ Re-create the database.
For information on how to restore your database in each of the preceding situations,
see your Sybase documentation.
See “Sybase Backup Server log and messages” on page 67.
See “Using isql to restore a Sybase database” on page 59.
See “Configuring a redirected restore on the NetBackup for Sybase client”
on page 60.
See “Modifying the restore script for NetBackup for Sybase on UNIX ” on page 32.
See “About the backup, restore, and load scripts for NetBackup for Sybase on
Windows ” on page 34.
Using NetBackup for Sybase 59
About restoring a Sybase database
See “About the backup, restore, and load scripts for NetBackup for Sybase on
Windows ” on page 34.
See “About restoring a Sybase database” on page 58.
See “Configuring a redirected restore on the NetBackup for Sybase client”
on page 60.
See “Modifying the restore script for NetBackup for Sybase on UNIX ” on page 32.
■ Specify the client name with the CLIENT_NAME option in the $HOME/bp.conf
or /usr/openv/netbackup/bp.conf file on the client. For example, the
following command specifies saturn as the client to browse.
Using NetBackup for Sybase 61
About restoring a Sybase database
CLIENT_NAME=saturn
install_path\NetBackup\logs\mklogdir.bat
Or, you can manually create the directories for the log files you want created.
install_path\NetBackup\logs\bpbackup
install_path\NetBackup\logs\bpbkar32
install_path\NetBackup\logs\bphdb
install_path\NetBackup\logs\bprestore
install_path\NetBackup\logs\tar32
install_path\NetBackup\logs\sybackup
For example:
cd install_path\NetBackup\logs
mkdir bphdb
/usr/openv/netbackup/logs/bpbackup
/usr/openv/netbackup/logs/bpbkar
/usr/openv/netbackup/logs/bphdb
/usr/openv/netbackup/logs/bprestore
/usr/openv/netbackup/logs/tar
/usr/openv/netbackup/logs/sybackup
For example:
cd /usr/openv/netbackup/logs
mkdir bphdb
2 Enable logging for the nbpem, nbjm, and nbrb scheduling processes that use
unified logging.
NetBackup writes unified logs to /usr/openv/logs.
You do not need to create log directories for the processes that use unified
logging.
Information on how to use logs and reports is available.
See the NetBackup Troubleshooting Guide.
3 If you create a debug log directory on the client, NetBackup for Sybase records
the dump file name in the resulting debug log.
The debug log directory that you can create is as follows:
/usr/openv/netbackup/logs/sybackup
NetBackup for Sybase sends an informational message that specifies the dump
file name to Sybase backup server.
This log contains debugging information for the bphdb process. bphdb is the
NetBackup database backup binary. It is invoked when an automatic backup
schedule is run. NetBackup for Sybase uses this client process for Sybase script
execution.
This log contains debugging information for the bphdb process. bphdb is the
NetBackup database backup binary. It is invoked when an automatic backup
schedule is run. NetBackup for Sybase uses this client process for Sybase script
execution.
This log contains debugging information and run status for the NetBackup for
Sybase client process.
See “Enabling the debug logs manually (UNIX)” on page 64.
Troubleshooting NetBackup for Sybase 66
NetBackup debug logs and reports
log.mmddyy.log
This log contains debugging information and execution status for the Sybase
NetBackup client processes program provided with NetBackup for Sybase.
VERBOSE = X
DUMP and LOAD progress Sybase Backup Server sends its dump and load progress messages to the client that
messages initiated the dump or load request. NetBackup for Sybase writes NetBackup for Sybase
progress messages to the following file, if the parent directory exists:
Error logging Sybase Backup Server performs its own error logging in the file that you specify when
you configure Sybase Backup Server. For more information on this file, see your Sybase
documentation.
Informational and error messages sent to the Sybase Backup Server log file include
messages from the Archive API. You can enable detailed diagnostic tracing for the
Archive API by specifying the -DTRACEIO option on the backup server command
line.
Note: To determine successful status of DUMP and LOAD commands, always check
Sybase Backup Server messages and logs.
The following Sybase Backup Server message log indicates successful DUMP command
completion:
the following procedure to minimize session timeouts and to allow the restores to
complete successfully.
To minimize timeout failures on large database restores
1 Open the NetBackup web UI.
2 On the left, click Hosts > Host properties.
3 Select the client.
4 If necessary, click Connect.
5 Click Edit client.
6 Click Timeouts.
7 Set the Client read timeout property to a large value.
The default for the Client read timeout setting is 300 seconds (5 minutes).
For database agent clients, increase the value significantly from the
recommended value.
See the NetBackup Administrator’s Guide, Volume 1.
For example, change this setting to 30-60 minutes to minimize timeout errors.
8 Click Save.
Note: This change may delay detecting problems during subsequent backups.
Consider putting the original value back in place once any restore that requires a
change is complete.
■ On Windows:
C:\Program Files\Veritas\NetBackup\bin>nbsetconfig
nbsetconfig> DB_SCRIPT_PATH=c:\db_scripts
nbsetconfig> DB_SCRIPT_PATH=e:\oracle\fullbackup\full_rman.sh
nbsetconfig>
<ctrl-Z>
Note: Review the NetBackup Command Reference Guide for options, such
as reading from a text file and remotely setting clients from a NetBackup server
using bpsetconfig. If you have a text file with the script location or authorized
locations listed, nbsetconfig or bpsetconfig can read from that text file. An
entry of DB_SCRIPT_PATH=none does not allow any script to run on a client.
The none entry is useful if an administrator wants to completely lock down a
server from running scripts.
Register authorized locations 72
Registering authorized locations used by a NetBackup database script-based policy