NetBackup AdminGuide Sybase Unix
NetBackup AdminGuide Sybase Unix
5 for Sybase
Feature Pack
Disclaimer
The information contained in this publication is subject to change without notice.
VERITAS Software Corporation makes no warranty of any kind with regard to this
manual, including, but not limited to, the implied warranties of merchantability and
fitness for a particular purpose. VERITAS Software Corporation shall not be liable for
errors contained herein or for incidental or consequential damages in connection with the
furnishing, performance, or use of this manual.
Copyright
Copyright © 1996–2003 VERITAS Software Corporation. All rights reserved. VERITAS,
VERITAS Software, the VERITAS logo, VERITAS NetBackup, and all other VERITAS
product names and slogans are trademarks or registered trademarks of VERITAS
Software Corporation in the USA and/or other countries. VERITAS, the VERITAS Logo,
and VERITAS NetBackup Reg. U.S. Pat. & Tm. Off. Other product names and/or slogans
mentioned herein may be trademarks or registered trademarks of their respective
companies.
Portions of this software are derived from the RSA Data Security, Inc. MD5
Message-Digest Algorithm. Copyright 1991-92, RSA Data Security, Inc. Created 1991. All
rights reserved.
VERITAS Software Corporation
350 Ellis Street
Mountain View, CA 94043
USA
Phone 650–527–8000
Fax 650–527–2908
www.veritas.com
Revision History
The following table summarizes the revisions made to this manual. These revisions are
noted in this manual with revision marks in the left margin.
Maintenance Pack 1 June 2002 This document version describes new features provided in NetBackup
4.5 Maintenance Update 1. Ensure that you are installing this
maintenance pack for use with this document.
New Features:
- Support for Sybase IQ databases. Differences for Sybase IQ are
covered in a new Appendix A.
Feature Pack January 2003 This document version describes new features provided in NetBackup
4.5_3_F Feature Pack 4.5_3_F. Ensure that you are installing this feature pack for
use with this document.
New Features:
- NetBackup for Sybase on UNIX now supports Encryption for
database backups.
Other Changes:
- The instructions for redirecting a restore to a different client have
been updated for clarification.
Chapter 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Features of NetBackup for Sybase on UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Terminology for NetBackup for Sybase on UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
NetBackup Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
NetBackup for Sybase on UNIX Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Technical Overview of NetBackup for Sybase on UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . 6
SQL Server and Sybase ASE Backup Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
v
NetBackup for Sybase on UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Sequence of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Chapter 2. Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Installation Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Installing NetBackup for Sybase on UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Remote Installation of NetBackup for Sybase on UNIX . . . . . . . . . . . . . . . . . . . . . . 11
Installation Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Remote Install Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Local Installation of NetBackup for Sybase on UNIX . . . . . . . . . . . . . . . . . . . . . . . . 17
Compaq Tru64 Clients - Required Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Chapter 3. Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Configuration Using the NetBackup Administration Console for Windows . . . . . . . 22
Configuring the Media Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Setting the Maximum Jobs per Client Global Attribute . . . . . . . . . . . . . . . . . . . . . . . . . 23
Configuring a NetBackup Policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Configuring a Sybase Policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Adding New Policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Description of Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Adding New Schedules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Types of Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Schedule Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Specifying the List of Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Adding Clients to a Policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Example Sybase Policy for Sybase ASE on a NetBackup Windows Server . . . 35
Creating a Standard Policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Configuration Using the NetBackup Administration Console for UNIX . . . . . . . . . . . 38
Configuring the Media Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Setting the Maximum Jobs per Client Global Attribute . . . . . . . . . . . . . . . . . . . . . . . . . 39
Configuring a NetBackup Policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Contents vii
Browsing Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Using xbp to Browse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Using bplist to Browse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Performing a Restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Using xbp to Restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Using isql to Restore a Sybase ASE Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Redirected Restore Configuration on the Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Chapter 5. Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
NetBackup and NetBackup for Sybase on UNIX Logs . . . . . . . . . . . . . . . . . . . . . . . . . . 82
NetBackup Server Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Setting the Debug Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Sybase Backup Server Logs and Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
DUMP and LOAD Progress Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
ERROR Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Preventing Timeout Failures on Large Database Restores . . . . . . . . . . . . . . . . . . . . . . . 86
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .103
Contents ix
x NetBackup for Sybase System Administrator’s Guide for UNIX
About This Guide
This guide describes how to install, configure and use VERITAS NetBackup for Sybase on
UNIX. In this guide, VERITAS NetBackup for Sybase on UNIX is referred to as NetBackup
for Sybase on UNIX.
For specific information about the NetBackup server software, refer to:
◆ NetBackup System Administrator’s Guide for UNIX, if you have a UNIX server.
or
◆ NetBackup System Adminstrator’s Guide for Windows if you have a Windows server.
This document is the same as NetBackup_AdminGuide_Sybase_Unix.pdf
distributed with the NetBackup for Sybase on UNIX software.
xi
Audience
Audience
This guide is intended for the:
◆ SYBASE database system administrator responsible for configuring and using the
SYBASE SQL Server and Backup Server to back up and restore SYBASE databases.
◆ NetBackup system administrator responsible for configuring NetBackup.
A system administrator is defined as a person with system administrator privileges and
responsibilities.
This guide assumes:
◆ A basic understanding of system administration.
◆ A working understanding of the NetBackup client and server software.
◆ A familiarity with the information covered in the following NetBackup manuals:
- NetBackup User’s Guide for UNIX
- NetBackup System Administrator’s Guide for UNIX or NetBackup System
Adminstrator’s Guide for Windows
- NetBackup Troubleshooting Guide for UNIX or NetBackup Troubleshooting Guide for
Windows
◆ A thorough understanding of the following Sybase database topics:
- SYBASE administration
- SYBASE commands
- SYBASE Backup Server Archive API (Application Program Interface)
Accessibility Features
NetBackup contains features that make the user interface easier to use by people who are
visually impaired and by people who have limited dexterity. Accessibility features
include:
◆ Support for assistive technologies such as screen readers and voice input (Windows
servers only)
◆ Support for keyboard (mouseless) navigation using accelerator keys and mnemonic
keys
For more information, see the NetBackup System Administrator’s Guide.
Organization
This guide is organized as follows:
◆ Chapter 1, “Introduction,” is an overview of the product’s capabilities.
◆ The Installation chapter explains how to install NetBackup for Sybase on UNIX on
your system.
◆ Configuration explains how to configure your system to use NetBackup for Sybase on
UNIX. This information supplements the NetBackup for Sybase on UNIX manuals.
◆ Chapter 4, “Using NetBackup for Sybase on UNIX,” explains how to use this product
to back up and restore your Sybase databases. This information supplements the
NetBackup manuals.
◆ Finally, the Troubleshooting chapter provides troubleshooting information.
Related Documents
The following documents provide related information. For a more detailed listing of
NetBackup documents, refer to NetBackup Release Notes.
If you have a UNIX server, refer to these documents:
◆ NetBackup System Administrator’s Guide for UNIX
Explains how to configure and manage NetBackup on a UNIX system.
◆ NetBackup Media Manager System Administrator’s Guide for UNIX
Explains how to configure and manage the storage devices and media on UNIX
NetBackup servers. Media Manager is part of NetBackup.
◆ NetBackup Troubleshooting Guide for UNIX
Provides troubleshooting information for UNIX-based NetBackup products. You can
also refer to www.support.veritas.com, access the Knowledge Base Search
option, and search for TechNotes.
If you have a Windows server, refer to these documents:
◆ NetBackup System Administrator’s Guide for Windows
Explains how to configure and manage NetBackup on a Windows server system.
◆ NetBackup Media Manager System Administrator’s Guide for Windows
Explains how to configure and manage the storage devices and media on Windows
NetBackup servers. Media Manager is part of NetBackup.
◆ NetBackup Troubleshooting Guide for Windows
Conventions
The following section explains typographical and other conventions used in this guide.
Type Style
The table below describes type face and type style conventions.
Typeface Usage
Bold fixed width Input typed at the keyboard. For example, you might see, “Type cd to
change directories.”
Fixed width Paths, commands, filenames, or output. For example, you might see,
“The default installation directory is /opt/openv.”
Italics Book titles, new terms, or terms used for emphasis. For example, you
might see, “Do not ignore cautions.”
This font is also used for placeholder text or variables, as in, “Replace
filename with the name of your file.”
Bold type (no italics) Graphical user interface (GUI) objects, such as fields or menu choices.
For example, you might see, “Enter your password in the Password
field.”
Caution This is a Caution. Cautions are used to warn about situations that could cause
data loss.
Key Combinations
Some keyboard command sequences use two or more keys at the same time. For example,
holding down the Ctrl key while pressing another key. Keyboard command sequences are
indicated by connecting the keys with a plus sign, as in the following example:
Press Ctrl+t
Command Usage
The following conventions are frequently used in the synopsis of command usage.
brackets [ ]
The enclosed command line component is optional.
Vertical bar or pipe (|)
Separates optional arguments from which the user can choose. For example, when a
command has the following format:
command arg1|arg2
In this example, the user can use either the arg1 or arg2 variable.
❖ Select Start > Programs > VERITAS NetBackup > NetBackup Administration
Console.
The corresponding actions could be described in more steps as follows:
4. Move your cursor to the right. First highlight and then click NetBackup
Administration Console.
Terms
The terms listed in the table below are used in VERITAS NetBackup documentation to
increase readability while maintaining technical accuracy.
NetBackup Terms
Term Definition
Microsoft Windows, Terms used as nouns to describe a line of operating systems developed
Windows by Microsoft, Inc.
Terms used as an adjective to describe a specific product or noun. Some
examples follow: Windows 95, Windows 98, Windows NT,
Windows 2000, Windows servers, Windows clients, Windows
platforms, Windows hosts, and Windows GUI.
When a specific Windows product is identified, only that particular
product is valid in that instance.
For more information on the Windows operating systems that
NetBackup supports, refer to the VERITAS support web site at
http://www.support.veritas.com.
Windows servers A term that defines the Windows server platforms that NetBackup
supports; those platforms are: Windows NT and Windows 2000.
Windows clients A term that defines the Windows client platforms that NetBackup
supports: Windows 95, 98, ME, NT, 2000, XP (for 32- and 64-bit
versions), and LE.
Getting Help
For updated information about this product, including system requirements, supported
platforms, supported peripherals, and a list of current patches available from Technical
Support, visit our web site:
http://www.support.veritas.com/
VERITAS Customer Support has an extensive technical support structure that enables you
to contact technical support teams that are trained to answer questions to specific
products. You can contact Customer Support by sending an e-mail to
support@veritas.com, or by finding a product-specific phone number from the VERITAS
support web site. The following steps describe how to locate the proper phone number.
2. Click Contact Support. The Contacting Support Product List page appears.
3. Select a product line and then a product from the lists that appear. The page will
refresh with a list of technical support phone numbers that are specific to the product
you just selected.
Glossary
If you encounter unfamiliar terminology, consult the NetBackup online glossary. The
glossary contains terms and definititions for NetBackup and all additional NetBackup
options and agents.
The NetBackup online glossary is included in the NetBackup help file.
1. In the NetBackup Administration Console (or from the Backup, Archive, and Restore
client interface), click Help > Help Topics.
1
Features of NetBackup for Sybase on UNIX
Feature Description
Media and device All devices supported by Media Manager are available to
management NetBackup for Sybase on UNIX.
Multiplexed backups and NetBackup for Sybase on UNIX lets you take advantage of
restores NetBackup’s multiplexing capabilities. Multiplexing directs
multiple data streams to one backup device, thereby reducing
the time necessary to complete the operation.
Transparent execution of All backups and restores are executed simultaneously and
both Sybase and regular transparently without any action from the NetBackup
file system backup and administrator.
restore operations
A Sybase administrator can execute database backup and
restore operations through NetBackup or use Sybase ASE
Backup Server as if NetBackup were not present.
An administrator or any other authorized user can use
NetBackup to execute database backups and restores.
Sharing the same devices It is possible to share the same devices and media used for
and tapes used during other backups or to give Sybase exclusive use of certain
other file backups devices and media.
Centralized and From the NetBackup master server, you can schedule
networked backup database backups or start them manually for any client. The
operations Sybase databases can also reside on hosts that are different
from the devices on which NetBackup stores the backups.
Feature Description
Graphical user interfaces NetBackup provides the following graphical user interfaces
for client users and administrators:
◆ Backup, Archive, and Restore user interface
◆ Client user interface on Java, jbpSA
◆ Client user motif interface, xbp
◆ NetBackup Administration Console for Java
◆ NetBackup Administration Console for Windows
A database administrator or NetBackup administrator can
start backup operations for Sybase from the NetBackup
graphical user interface on the master server.
Parallel backup and NetBackup for Sybase on UNIX supports the parallel backup
restore operations and restore capabilities of the Sybase ASE Backup Server. This
permits the user to run more than one tape device at a time for
a single Sybase ASE backup or restore, thereby reducing the
time necessary to complete the operation.
Chapter 1, Introduction 3
Terminology for NetBackup for Sybase on UNIX
NetBackup Terms
This section describes NetBackup terms as they apply to NetBackup for Sybase on UNIX.
For explanations of other NetBackup terms, consult the NetBackup online glossary. For
instructions, see the “Glossary” section in About This Guide.
SQL Server and Sybase SQL Server improves the backup and restore functions of
ASE Backup Server Sybase ASE Backup Server by using remote-procedure calls to
instruct Sybase ASE Backup Server to back up or restore specific
databases.
NetBackup for Sybase on UNIX enhances SQL Server
functionality by integrating Sybase ASE Backup Server with
NetBackup. This provides access to NetBackup
media-management and scheduling in addition to graphical
and menu interfaces.
SQL Server DUMP and These SQL Server commands are used for Sybase ASE 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
on UNIX.
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.
Sybase Adaptive Server A powerful data management platform for mission-critical,
Enterprise transaction-intensive enterprise applications.
Sybase ASE Sybase Adaptive Server Enterprise.
Chapter 1, Introduction 5
Technical Overview of NetBackup for Sybase on UNIX
DB NetBackup
SQL Server Master-Server
and Backup Server
Network (TCP/IP)
Tape or Optical
SYBASE database DB
NetBackup for
to back up or restore
SYBASE
NetBackup Note:
database NetBackup includes
Media Manager
NetBackup
software.
Client Installation
When either a Sybae ASE DUMP or LOAD command is processed, SQL Server sends Sybase
ASE Backup Server the directives to dump or load the specified database or transaction
log. These directives indicate which set of archive devices to use for the dump image.
Sybase ASE Backup Server then handles all data transfer for the operation.
For more information on SQL Server and Sybase ASE Backup Server, refer to the SYBASE
SQL Server Installation and Configuration Guide for your platform and the SYBASE SQL
Server System Administration Guide.
Chapter 1, Introduction 7
Technical Overview of NetBackup for Sybase on UNIX
Sequence of Operation
NetBackup operations are controlled by Sybase script files. A user selects a script through
the NetBackup client user interface. Refer to “Using NetBackup for Sybase on UNIX” on
page 71 for details. A schedule is configured, through the NetBackup server interface, to
use a script to perform NetBackup operations. Refer to “Configuration” on page 21 for
details.
The following process takes place when a script is selected.
For a backup:
1. A NetBackup process called bphdb starts the Sybase backup script on the client.
2. The Sybase backup script then starts the isql utility with the Sybase SQL script as an
input file.
4. When the process requires media to store backup data, NetBackup for Sybase on
UNIX starts a user-directed backup by using the NetBackup bpbackup command.
5. The NetBackup master server then connects to NetBackup for Sybase on UNIX on the
client.
6. Sybase ASE Backup Server sends data to NetBackup for Sybase on UNIX, which
transfers data to the master server.
Note The Sybase ASE Backup Server API does not support the Remote Sybase ASE
Backup Server feature. All network communications are controlled by NetBackup.
Note Each time you install a new instance of Sybase, you will need to re-install
NetBackup for Sybase. You can re-install NetBackup for Sybase by executing the
following command:
install_path/netbackup/bin/install_sybackup
9
Installation Prerequisites
Installation Prerequisites
Before installing NetBackup for Sybase on UNIX, be sure you have completed the
following procedures:
❖ Install the NetBackup client software on the client where you will be backing up the
databases.
For a BusinesServer installation, refer to the NetBackup BusinesServer Getting Started
Guide for UNIX for installation instructions on UNIX clients.
For a DataCenter installation, refer to the NetBackup DataCenter Installation Guide for
UNIX for installation instructions on UNIX clients.
❖ Install the Sybase vendor software on the client where you will be backing up the
databases.
See the Sybase SQL Server Installation and Configuration Guide for instructions on
installing Sybase ASE.
Now you are ready to install NetBackup for Sybase on UNIX on the client where you will
be backing up the databases. Refer to the next section for detailed instructions on
installing NetBackup for Sybase on UNIX.
Installation Requirements
◆ The version of the NetBackup Client and the version of NetBackup for Sybase on
UNIX must be the same (e.g., 4.5).
◆ There must be adequate disk space on each client that will receive the software.
Less than one megabyte of additional disk space is required in the client's
install_path/netbackup directory. However, more disk space may be necessary at run
time.
◆ NetBackup version 4.5 client software is installed and operational on each Sybase
client.
This also means that the directory install_path/netbackup already exists on
each Sybase client.
2. Make sure a valid license key for NetBackup for Sybase on UNIX has been registered.
To view or add license keys, perform one of the following:
Chapter 2, Installation 11
Installing NetBackup for Sybase on UNIX
b. Answer n.
You are presented with a menu of all database agents available on the CD-ROM.
e. Answer y.
The install script identifies the types of client software loaded during the
installation of the NetBackup server. By default, any matching NetBackup for
Sybase on UNIX software will automatically be loaded. If there are more
platforms available, the script displays a menu giving you the opportunity to add
more client types to the default list. Once the list is complete, database agent
version files, compressed tar files and the install_dbext script are copied to
directory install_path/netbackup/dbext.
6. Distribute and install the NetBackup for Sybase on UNIX software on each client as
described in the next sections.
There are two types of installs.
- initial install — Use an initial install if the clients you intend to update have not
been configured into policies of type Sybase.
- upgrade install — Use an upgrade install if all the clients you intend to update
already have been configured into policies of type Sybase.
Note The NetBackup version level (for example, 4.5) running on the clients you wish to
update must be the same as the version level of the NetBackup for Sybase on UNIX
being installed.
1. Execute the following command to create a file containing a list of clients currently
configured in the NetBackup database.
cd install_path/netbackup/bin
./admincmd/bpplclients -allunique -noheader > filename
where filename is the name of the file to contain the list of unique clients. If no clients
have been configured in the NetBackup database, and therefore filename is empty,
create filename using the same format as that generated by bpplclients.
bpplclients generates output in following format:
hardware operating_system client_name
where:
hardware is the hardware name. For example, execute the ls command in
directory install_path/netbackup/client.
operating_system is the operating system name. For example, execute the ls
command in directory install_path/netbackup/client/hardware.
client_name is the name of the client.
For example, the contents of filename might look like this:
Solaris Solaris2.6 curry
RS6000 AIX4.3.3 cypress
2. Edit filename.
This is an optional step. Use it if the contents of filename need to be changed. Edit
filename to contain only those clients you wish to update with NetBackup for Sybase
on UNIX software.
Chapter 2, Installation 13
Installing NetBackup for Sybase on UNIX
Note With an initial or upgrade install, some clients may be skipped and not updated.
Possible reasons are:
- the client is a PC client (which cannot be updated from a UNIX server)
- NetBackup for Sybase on UNIX does not support that client's platform type
- the NetBackup for Sybase on UNIX software for that client type was not loaded
onto the server in step 5 of the “Remote Install Procedure” on page 11
- (if using the ALL ALL method) the client does not belong to the Sybase policy type
All skipped clients are available in a file whose name is displayed by
update_dbclients.
The number of updates required to distribute the software to the clients is displayed.
If more than one update will occur, you will see the following prompt:
Enter the number of simultaneous updates you wish to take place. 1 - max dflt
(must be in the range of 1 to max; default: dflt).
where:
max is the maximum number of simultaneous updates that is allowed. The value
displayed will be a number ranging from 1 to 30.
dflt is the default number the program will use if you press Enter. The value
displayed will be a number ranging from 1 to 15.
For example, if three client updates will be performed, the max and dflt values shown
would be 3. If 50 client updates will be performed, the max value shown would be 30
and the dflt value shown would be 15.
update_dbclients will start the number of updates that you specify. If this number
is less than the total number of client updates to be performed, new updates will start
as the previous updates finish until all of the updates have been completed.
Based on your answer, the time it will take to update the clients is displayed, followed
by this question:
Do you want to upgrade the clients now? (y/n) [y]
Type the location where the Sybase vendor software has been installed on the
client shown. It will continue to ask this question until you indicate you are
through specifying Sybase instances. You also will have an opportunity to
validate your answer.
- If the update_dbclients command is able to determine a client’s
configuration, it will not prompt.
To change a client’s Sybase instance configuration information later, you must log
onto the client and execute the command
install_path/netbackup/bin/install_sybackup.
- If more than one client is being updated, the configuration information for the
previous client (whether determined by asking explicitly or by
update_dbclients itself) establishes a default answer for the next client. This
makes configuration simpler when the clients have been similarly configured.
Therefore, you may see a display similar to the following:
-----> Client guava
Chapter 2, Installation 15
Installing NetBackup for Sybase on UNIX
curry
guava
hat
As far as the script is concerned, the configuration information for all three clients
is unknown.
Assume the instance home path on curry is /sybase, so when you are
prompted for configuration information for curry, specify /sybase as the
Sybase instance home path name.
The next client is guava.
- If client guava also has /sybase as its Sybase instance home path name, the
answer to the Use the previous response? prompt will be y.
- If client guava has a different configuration, the answer to the Use the
previous response? prompt will be n. The Please specify the Sybase
instance home path name: prompt will re-display. At this point you specify
a different home path name.
The next client is hat. The Sybase instance home path name you entered for
guava becomes the “previous response” displayed for hat.
If the update_dbclients command was successful in distributing the software to the
client, it will automatically run the install_dbext script on the client. Configuration
information determined in step 2 on page 15 is used to complete the installation. If
install_dbext has successfully completed, there will be a version file in directory
install_path/netbackup/ext that contains the version of NetBackup for Sybase on
UNIX that was installed and an installation timestamp. The update_dbclients
command displays a note on whether the update was successful for each client. When the
update_dbclients command has completed, it displays a file name that contains a
complete log of what happened for each client. If the update failed for any client, the log
file should be examined to determine the problem.
Installation Requirements
◆ The version of the NetBackup Client and the version of NetBackup for Sybase on
UNIX are the same (e.g., 4.5).
◆ The local machine must have adequate disk space.
Less than one megabyte of additional disk space is required in the
install_path/netbackup directory. However, more disk space may be necessary
at run time.
◆ NetBackup version 4.5 client software is installed and operational.
This also means that the install_path/netbackup directory already exists.
2. Make sure a valid license key for NetBackup for Sybase on UNIX has been registered.
To view or add license keys, perform one of the following:
- Run the command
install_path/netbackup/bin/admincmd/get_license_key.
- Open the NetBackup Administration Console and choose Help > License Keys.
Chapter 2, Installation 17
Installing NetBackup for Sybase on UNIX
Note It is expected that the NetBackup version level (for example, 4.5) running on the
local machine matches the version level of the database agent being installed.
./install
b. Answer y.
You are presented with a menu of all database agents available on the CD-ROM.
e. Answer y.
The following actions will occur:
- The version file, compressed tar file and install_dbext script will be
loaded to directory install_path/netbackup/dbext.
- The install script will automatically execute the install_dbext script.
- After the install_dbext script unbundles the NetBackup for Sybase
compressed tar file, you will be prompted for the following configuration
information:
Please specify the Sybase instance home path name:
Type the location where the Sybase vendor software has been installed. It will
continue to ask this question until you indicate you are through specifying
Sybase instances.
- If install_dbext has successfully completed, there will be a version file in
directory install_path/netbackup/ext/ that contains the version of
NetBackup for Sybase on UNIX that was installed and an installation
timestamp.
For NetBackup 4.5 for Sybase, Sybase ASE Backup Server must be started with special
environment variables, _RLD_ARGS=-taso and
LD_LIBRARY_PATH=/usr/openv/lib. The NetBackup 4.5 for Sybase install script,
install_sybackup, sets these environment variables in the Sybase ASE login scripts.
For Sybase ASE 12.0, these login scripts are SYBASE.sh for the Bourne shell or
SYBASE.csh for the C shell.
For Sybase ASE 11.9.2, these login scripts are .profile for the Bourne shell or .cshrc
for the C shell.
All of these login scripts are located in the Sybase ASE home directory.
The user must invoke one of these login scripts so that the user’s environment gets set up
correctly before the Sybase ASE Backup Server is started. If the user’s environment is not
set up correctly before Sybase ASE Backup Server is started, one of the following errors
will be reported when a backup is attempted from NetBackup 4.5 for Sybase.
Backup Server: 4.145.2.73: [0] Error for device ’sybackup::-SERV
-SCHED Default-Application-Backup::00’. Pipe I/O returned 0 bytes
Backup Server Internal Error: 4.62.3.4: Multibuffering
subprocesses died, archive sybackup::-SERV -SCHED
Default-Application-Backup::00. Backup Server: 4.141.2.66: [0] The
’write’ call failed for device ’sybackup::-SERV -SCHED
Default-Application-Backup::00’ with error number 32 (Broken
pipe). Refer to your operating system documentation for further
details.
After installing or upgrading to NetBackup 4.5 for Sybase, the Sybase ASE Backup Server
must be stopped and restarted with these environment variables to prevent this problem.
Chapter 2, Installation 19
Installing NetBackup for Sybase on UNIX
4. Creating Scripts
21
Configuration Using the NetBackup Administration Console for Windows
2. Choose Start > Programs > VERITAS NetBackup > NetBackup Administration
Console.
Chapter 3, Configuration 23
Setting the Maximum Jobs per Client Global Attribute
◆ Number of Streams is 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 is the number of policies that may back up this client at the same
time. This number can be greater than one. For example, a client may be in two
policies in order to back up two different databases. These backup windows may
overlap.
▼ To set the Maximum jobs per client attribute using the Windows console
1. In the left pane of the NetBackup Administration Console, expand Host Properties.
Select Master Server.
3. In the Master Server Properties dialog, click the Global NetBackup Attributes tab.
4. Change the Maximum jobs per client value to a value equal to the maximum number
of backups allowed per client.
Tip To avoid any problems, we recommend that you enter a value of 99 for the
Maximum jobs per client global attribute.
Note If you are going to perform striped dumps or loads, also see “Enabling Striped
Dumps and Loads” on page 65.
Note This policy name can be specified in the bp.conf file on the client. This policy
name can also be specified in the $SYBASE_HOME/bp.conf file. Refer to
“Configuring the bp.conf File” on page 63 for details.
Also, this policy name can be specified in the Sybase backup script. Refer to
“Instructions for Modifying Backup Scripts for Use with Sybase ASE” on page 57
for more details.
Chapter 3, Configuration 25
Configuring a NetBackup Policy
3. If your site has more than one master server, choose the one where you want to add
the policy.
a. In the Policy name box, type a unique name for the new policy.
b. Choose whether to use the wizard for configuring the policy. The wizard guides
you through the most of the setup process and simplifies it by automatically
choosing default values that are good for most configurations. If necessary, you
can change the defaults later by editing the policy. You will need to manually add
entries to the Scripts list after completing the wizard.
- To use the wizard, select the Use Backup Policy Configuration Wizard box
and click OK. The wizard starts and you create the policy by following the
prompts. When prompted, select the Sybase policy type.
- If you require more control over the settings than the wizard provides, then
do not select the Use Backup Policy Configuration Wizard box and proceed
to step 5.
5. Click OK.
A dialog is displayed in which you can specify the general attributes for the policy.
6. From the Policy Type box, select the Sybase policy type.
Description of Attributes
With a few exceptions, NetBackup manages a database backup like a file system backup.
Policy attributes that are different for Sybase backups are explained below.
Chapter 3, Configuration 27
Configuring a NetBackup Policy
Your other policy attributes will vary according to your specific backup strategy and
system configuration. Consult the NetBackup System Administrator’s Guide for detailed
explanations of the policy attributes.
Attribute Description
Policy type Determines the type of clients that can be in the policy and in some cases
the types of backups that can be performed on those clients.
To use NetBackup for Sybase on UNIX, you must have defined at least one
Sybase policy.
Keyword phrase For NetBackup for Sybase on UNIX, the keyword phrase entry is ignored.
Encryption Protects sensitive data by encoding it during the backup process. The data
is decoded during the restore process. See the NetBackup Encryption System
Administrator’s Guide for details.
Allow multiple data Specifies that, depending on directives in the file list, NetBackup can divide
streams automatic backups for each client into multiple jobs, with each job backing
up only a part of the file list. The jobs are in separate data streams and can
occur concurrently. The number of available storage units, multiplex
settings, and the maximum jobs parameters determines the total number of
streams and how many can run concurrently.
Note This Application Backup schedule name can be specified in the bp.conf file on the
client. This Application Backup schedule name can also be specified in the
$SYBASE_HOME/bp.conf file. Refer to “Configuring the bp.conf File” on
page 63 for details. Also, this Application Backup schedule name can be specified in
the Sybase backup script. Refer to “Instructions for Modifying Backup Scripts for
Use with Sybase ASE” on page 57 for more details.
2. Specify the other properties for the schedule as explained in “Schedule Properties.”
The backup window for an Application Backup schedule must encompass the time
period during which all NetBackup jobs, scheduled and unscheduled, will occur. This
is necessary because the Application Backup schedule starts processes that are
required for all NetBackup for Sybase on UNIX backups, including those started
automatically.
For example, assume that you:
- expect users to perform NetBackup operations during business hours, 0800 to
1300.
- configured automatic backups to start between 1800 and 2200.
The Application Backup schedule must have a start time of 0800 and a duration of 14
hours.
Tip Set the time period for the Application Backup schedule for 24 hours per day, seven
days per week. This will ensure that your NetBackup for Sybase on UNIX
operations are never locked out due to the Application Backup schedule.
Chapter 3, Configuration 29
Configuring a NetBackup Policy
Note Generally, you will want to configure two Automatic Backup schedules for each
Sybase ASE database; one for the database dump backups and one for the
transaction log backups.
1. In the left pane, right-click on the name of the policy and select New Schedule.
The Add New Schedule dialog is displayed. The title bar shows the name of the policy
to which you are adding the schedules.
Refer to the following table for recommended settings for an Automatic Backup
schedule.
4. Specify the other properties for the schedule as explained in “Schedule Properties.”
Types of Backups
Automatic Backup An Automatic Backup schedule specifies the dates and times when
NetBackup will automatically start backups by running the Sybase backup
scripts in the order that they appear in the file list. If there is more than one
client in the Sybase policy, the Sybase backup scripts are executed on each
client.
Schedule Properties
Some of the schedule properties have a different meaning for database backups than for a
regular file system backup. These properties are explained below.
Chapter 3, Configuration 31
Configuring a NetBackup Policy
Other schedule properties will vary according to your specific backup strategy and
system configuration. Consult the NetBackup System Administrator’s Guide for detailed
explanations of the schedule properties.
Property Description
Type of backup Specifies the type of backup that this schedule will control. The selection list
shows only the backup types that apply to the policy you are configuring.
For more information see “Types of Backups.”
Frequency This setting is used only for scheduled backups, and not for user-directed
backups. Frequency specifies the period of time that will elapse until the
next backup operation can begin on this schedule. For example, if the
frequency is seven days and a successful backup occurs on Wednesday, the
next full backup will not occur until the following Wednesday. Normally,
incremental backups will have a shorter frequency than full backups.
Calendar This setting is used only for scheduled backups, and not for user-directed
backups. The Calendar option allows you to schedule backup operations
based on specific dates, recurring week days, or recurring days of the
month.
Property Description
Multiple copies If you are licensed for the Inline Tape Copy feature and wish to specify
multiple copies for your Sybase policy, configure Multiple copies on the
Application Backup schedule.
1. In the left pane of the NetBackup Administration Console, right-click on the policy
name and click New Script.
A dialog is displayed. The title bar shows the name of the policy to which you are
adding the scripts.
Chapter 3, Configuration 33
Configuring a NetBackup Policy
where script_name is the name of the Sybase backup script that the customer actually
uses to back up the Sybase database. An example for Sybase ASE is
sybase_mydb_backup, a sample script copied to the client during NetBackup for
Sybase installation.
Refer to “Instructions for Modifying Backup Scripts for Use with Sybase ASE” on
page 57for more details on Sybase backup scripts.
Note Alternatively, use the Browse button in the Add Script dialog to locate and specify
the script on the client.
Be sure that the Sybase scripts listed here are installed on each client in the Client list.
3. Click Add.
1. In the left pane of the NetBackup Administration Console, right-click on the policy
name and click New Client.
The Add New Client dialog is displayed. The title bar shows the name of the policy to
which you are adding the clients.
2. In the Client name text box, type the name of the client that you are adding.
On the client the following should be installed:
- Sybase
- NetBackup client or server
- NetBackup for Sybase on UNIX
4. Click Add.
5. To add another client, repeat step 2 through step 4. If this is the last client, click Close
to close the dialog.
In this policy, we set the policy type to Sybase and use a separate volume pool named
NetBackup. NetBackup will use the NetBackup volume pool to store all the images
associated with Sybase backups.
The Client list names the client that has the database.
The File List specifies the name of the Sybase backup script for the database and
transaction log dumps. We created this script previously and named it:
install_path/netbackup/ext/db_ext/sybase/scripts/sybase_mydb_backup
The three schedules for this policy are named:
Chapter 3, Configuration 35
Configuring a NetBackup Policy
◆ database_dump
◆ transaction_dump
◆ Default-Application-Backup
First, we set up the schedules named database_dump and transaction_dump. These are
Automatic Backup schedules that execute automatically at the designated times.
database_dump
Executes once a week between 6 pm (18:00) on Friday night and 6 am (06:00)
Saturday morning. When the sybase_mydb_backup script detects this
schedule name, it starts a full backup of the database by performing a
database dump.
transaction_dump
Executes every night between 6 pm (18:00) and 6 am (06:00). When the
sybase_mydb_backup script detects this schedule name, it starts a backup
of the transaction logs by performing a transaction log dump.
At this point, our configuration will cause a Sybase database dump to occur every Friday
night, and a transaction log dump to occur every night except Friday.
The Application Backup schedule named Default-Application-Backup was created when
the NetBackup Sybase policy was created. The backup window for this schedule
encompasses the windows for the Automatic Backup schedules. It also includes the times
user backups are allowed. To accomplish this, the user-directed window is open 24 hours
a day, every day of the week. This permits scheduled backups and user directed backups
to occur at any time.
Chapter 3, Configuration 37
Configuration Using the NetBackup Administration Console for UNIX
3. Type the name of the master server where you initially want to manage NetBackup.
You can specify any NetBackup master server. Indicate the User and Password.
Chapter 3, Configuration 39
Setting the Maximum Jobs per Client Global Attribute
◆ Number of Streams is 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 is the number of policies that may back up this client at the same
time. This number can be greater than one. For example, a client may be in two
policies in order to back up two different databases. These backup windows may
overlap.
▼ To set the Maximum jobs per client attribute using the NetBackup Administration
Console for UNIX
1. In the left pane of the NetBackup Administration Console, expand Host Properties.
Select Master Servers.
2. In the right pane, double-click on the server icon. Click Global Attributes.
The Master Server Properties dialog is displayed.
3. Change the Maximum jobs per client value to a value equal to the maximum number
of backups allowed per client.
Tip To avoid any problems, we recommend that you enter a value of 99 for the
Maximum jobs per client global attribute.
Note If you are going to perform striped dumps or loads, also see “Enabling Striped
Dumps and Loads” on page 65.
Note This policy name can be specified in the bp.conf file on the client. This policy
name can also be specified in the $SYBASE_HOME/bp.conf file. Refer to
“Configuring the bp.conf File” on page 63 for details.
Also, this policy name can be specified in the Sybase backup script. Refer to
“Instructions for Modifying Backup Scripts for Use with Sybase ASE” on page 57
for more details.
Chapter 3, Configuration 41
Configuring a NetBackup Policy
3. If your site has more than one master server, choose the one to which you want to add
the policy.
4. In the left pane, click on Policies. The right pane splits into an All Policies pane and a
details pane.
5. In the All Policies pane, right-click on the Master Server, and click New.
The Add a New Policy dialog is displayed.
a. In the Policy name box, type a unique name for the new policy.
b. Choose whether to use the wizard for configuring the policy. The wizard guides
you through the most of the setup process and simplifies it by automatically
choosing default values that are good for most configurations. If necessary, you
can change the defaults later by editing the policy. You will need to manually add
entries to the Scripts list after completing the wizard.
- To use the wizard, select the Use add policy wizard box and click OK. The
wizard starts and you create the policy by following the prompts. When
prompted, select the Sybase policy type.
- If you require more control over the settings than the wizard provides, do not
select the Use add policy wizard box and proceed to step 6.
6. Click OK.
A dialog is displayed in which you can specify the general attributes for the policy.
7. From the Policy type box, select the Sybase policy type.
Chapter 3, Configuration 43
Configuring a NetBackup Policy
Description of Attributes
With a few exceptions, NetBackup manages a database backup like a file system backup.
Policy attributes that are different for Sybase backups are explained below.
Your other policy attributes will vary according to your specific backup strategy and
system configuration. Consult the NetBackup System Administrator’s Guide for detailed
explanations of the policy attributes.
Attribute Description
Policy type Determines the type of clients that can be in the policy and in some cases
the types of backups that can be performed on those clients.
To use NetBackup for Sybase on UNIX, you must have defined at least one
Sybase policy.
Keyword phrase For NetBackup for Sybase on UNIX, the keyword phrase entry is ignored.
Encryption Protects sensitive data by encoding it during the backup process. The data
is decoded during the restore process. See the NetBackup Encryption System
Administrator’s Guide for details.
Allow multiple data Specifies that, depending on directives in the file list, NetBackup can divide
streams automatic backups for each client into multiple jobs, with each job backing
up only a part of the file list. The jobs are in separate data streams and can
occur concurrently. The number of available storage units, multiplex
settings, and the maximum jobs parameters determines the total number of
streams and how many can run concurrently.
Note This Application Backup schedule name can be specified in the bp.conf file on the
client. This Application Backup schedule name can also be specified in the
$SYBASE_HOME/bp.conf file. Refer to “Configuring the bp.conf File” on
page 63 for details Also, this Application Backup schedule name can be specified in
the Sybase backup script. Refer to “Instructions for Modifying Backup Scripts for
Use with Sybase ASE” on page 57 for more details..
3. Specify the other properties for the schedule as explained in “Schedule Properties.”
The backup window for an Application Backup schedule must encompass the time
period during which all NetBackup jobs, scheduled and unscheduled, will occur. This
is necessary because the Application Backup schedule starts processes that are
required for all NetBackup for Sybase on UNIX backups, including those started
automatically.
For example, assume that you:
- expect users to perform NetBackup operations during business hours, 0800 to
1300.
- configured automatic backups to start between 1800 and 2200.
The Application Backup schedule must have a start time of 0800 and a duration of 14
hours.
Chapter 3, Configuration 45
Configuring a NetBackup Policy
Tip Set the time period for the Application Backup schedule for 24 hours per day, seven
days per week. This will ensure that your NetBackup for Sybase on UNIX
operations are never locked out due to the Application Backup schedule.
Note Generally, you will want to configure two Automatic Backup schedules for each
Sybase ASE database; one for the database dump backups and one for the
transaction log backups.
1. In the All Policies pane, expand the policy you wish to configure. Right-click
Schedules and choose New.
A dialog is displayed. The title bar shows the name of the policy to which you are
adding the schedules.
Chapter 3, Configuration 47
Configuring a NetBackup Policy
Refer to the following tables for recommended settings for an Automatic Backup
schedule.
4. Specify the other properties for the schedule as explained in “Schedule Properties.”
Types of Backups
Automatic Backup An Automatic Backup schedule specifies the dates and times when
NetBackup will automatically start backups by running the Sybase backup
scripts in the order that they appear in the file list. If there is more than one
client in the Sybase policy, the Sybase backup scripts are executed on each
client.
Schedule Properties
Some of the schedule properties have a different meaning for database backups than for a
regular file system backup. These properties are explained below.
Other schedule properties will vary according to your specific backup strategy and
system configuration. Consult the NetBackup System Administrator’s Guide for detailed
explanations of the schedule properties.
Property Description
Type of backup Specifies the type of backup that this schedule will control. The selection list
shows only the backup types that apply to the policy you are configuring.
For more information see “Types of Backups.”
Frequency This setting is used only for scheduled backups, and not for user-directed
backups. Frequency specifies the period of time that will elapse until the
next backup operation can begin on this schedule. For example, if the
frequency is seven days and a successful backup occurs on Wednesday, the
next full backup will not occur until the following Wednesday. Normally,
incremental backups will have a shorter frequency than full backups.
Calendar This setting is used only for scheduled backups, and not for user-directed
backups. The Calendar option allows you to schedule backup operations
based on specific dates, recurring week days, or recurring days of the
month.
Chapter 3, Configuration 49
Configuring a NetBackup Policy
Property Description
Multiple copies If you are licensed for the Inline Tape Copy feature and wish to specify
multiple copies for your Sybase policy, configure Multiple copies on the
Application Backup schedule.
2. In the All Policies pane, expand the policy to which you want to add the scripts.
The Add File dialog is displayed. The title bar shows the name of the policy to which
you are adding the scripts.
5. Click Add.
Chapter 3, Configuration 51
Configuring a NetBackup Policy
2. In the All Policies pane, expand the policy you wish to configure.
4. In the Client name text box, type the name of the client that you are adding.
On the client the following should be installed:
- Sybase
- NetBackup client or server
- NetBackup for Sybase on UNIX
- the backup and restore Sybase script(s)
5. Choose the hardware and operating system type and click Add.
6. If this is the last client, click OK. If you are going to add more clients, repeat step 4 and
step 5.
In this policy, we set the policy type to Sybase and use a separate volume pool named
NetBackup. NetBackup will use the NetBackup volume pool to store all the images
associated with Sybase backups.
The Client list names the client that has the database.
Chapter 3, Configuration 53
Configuring a NetBackup Policy
The File List specifies the name of the Sybase backup script for the database and
transaction log dumps. We created this script previously and named it:
install_path/netbackup/ext/db_ext/sybase/scripts/sybase_mydb_backup
The three schedules for this policy are named:
◆ database_dump
◆ transaction_dump
◆ Default-Application-Backup
First, we set up the schedules named database_dump and transaction_dump. These are
Automatic Backup schedules that execute automatically at the designated times.
database_dump
Executes once a week between 6 pm (18:00) on Friday night and 6 am (06:00)
Saturday morning. When the sybase_mydb_backup script detects this
schedule name, it starts a full backup of the database by performing a
database dump.
transaction_dump
Executes every night between 6 pm (18:00) and 6 am (06:00). When the
sybase_mydb_backup script detects this schedule name, it starts a backup
of the transaction logs by performing a transaction log dump.
At this point, our configuration will cause a Sybase database dump to occur every Friday
night, and a transaction log dump to occur every night except Friday.
The Application Backup schedule named Default-Application-Backup was created when
the NetBackup Sybase policy was created. The backup window for this schedule
encompasses the windows for the Automatic Backup schedules. It also includes the times
user backups are allowed. To accomplish this, the user-directed window is open 24 hours
a day, every day of the week. This permits scheduled backups and user directed backups
to occur at any time.
Chapter 3, Configuration 55
Creating Scripts
Creating Scripts
Sybase SQL scripts cause SQL Server to send the directives to Sybase ASE Backup Server
that initiate a dump or load of the specified database or transaction log. The Sybase isql
utility communicates with SQL server. See the SYBASE SQL Server Utility Programs for
Unix manual for information about the isql utility (this manual is available from
Sybase).
The following example scripts were included with the NetBackup for Sybase on UNIX
installation for use with Sybase ASE:
sybase_mydb_backup
sybase_mydb_load
sybase_mydb_restore
These scripts were installed in the following directory:
install_path/netbackup/ext/db_ext/sybase/scripts/
Be sure to modify these scripts for your environment.
Note If necessary, copy the example scripts to a different directory on your client. Sybase
backup scripts can be located anywhere on the client.
Although each script can have multiple Sybase ASE Backup Server operations, a separate
script is required for each type of operation. For example, you need separate scripts for
backups and restores.
Caution Always specify the correct script when configuring automatic backups or when
starting operations through NetBackup. NetBackup for Sybase on UNIX will
not generate an error if a restore script is used for a backup operation or a
backup script is used for a restore operation.
#***************************************************************************
# 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
Chapter 3, Configuration 57
Creating Scripts
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.
# Replace "Default-Application-Backup" below with your actual NetBackup
# Application Backup type schedule name for the Sybase database.
# **************************************************************************
# echo stripe on \"sybackup::-SERV $SYBACKUP_SERVER -POL $SYBACKUP_POLICY -SCHED
Default-Application-Backup\" >> ./syb_${DATABASE_NAME}_dump
#***************************************************************************
# 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
Test the scripts you just created. Refer to “Testing NetBackup for Sybase on UNIX
Configuration Settings” on page 67.
Chapter 3, Configuration 59
Creating Scripts
#***************************************************************************
# Replace /usr/sybase12 below with your actual Sybase home directory
#***************************************************************************
SYBASE=/usr/sybase12
#***************************************************************************
# Replace SYBASE12 below with your actual name of the SQL Server
#***************************************************************************
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
Chapter 3, Configuration 61
Creating Scripts
You can specify the NetBackup server on the device string of the LOAD command as
shown in the following example.
load database mydb from "sybackup::SYBASE12.mydb.D.0.24312.20-12-2001.23:05:25 -SERV saturn"
go
online database mydb
go
The -SERV option will override any server that is specified in the bp.conf file.
Test the scripts you just modified. Refer to “Testing NetBackup for Sybase on UNIX
Configuration Settings” on page 67 .
Environment Variables
When a schedule executes, NetBackup sets environment variables for the scripts to use
when performing the backup. These environment variables are as follows:
SYBACKUP_SERVER
Name of the NetBackup server.
SYBACKUP_POLICY
Name of the NetBackup policy.
SYBACKUP_SCHED
Name of the Automatic Backup schedule.
SYBACKUP_SCHEDULED
Set to 1 if this is a scheduled backup (Automatic Backup).
SYBACKUP_USER_INITIATED
Set to 1 if this is a user-initiated backup (Application Backup backup).
Note The SYBACKUP_POLICY and SYBACKUP_SCHED variables are set up only if the
backup is initiated from the server (either automatically by the NetBackup
scheduler or manually through the administrator interface).
1. $SYBASE/bp.conf
2. install_path/netbackup/bp.conf
Note NetBackup will use 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 non-Sybase type Policy or Schedule is
configured in the NetBackup Client Configuration, the -POLICY or -SCHED option
must be used on the Sybase ASE DUMP command to specify the correct Policy or
Schedule. Refer to “Instructions for Modifying Backup Scripts for Use with Sybase
ASE” on page 57 for details on how to specify a Policy or Schedule on the Sybase
ASE DUMP command.
If NetBackup fails to find POLICY and SCHEDULE definitions, NetBackup for Sybase on
UNIX will default to the first POLICY and SCHEDULE with the appropriate policy type.
1. Create a bp.conf file in your Sybase home directory. For example, if $SYBASE is
/sybase, you will create the following file:
/sybase/bp.conf
Chapter 3, Configuration 63
Configuring the bp.conf File
Note NetBackup uses the $SYBASE/bp.conf file only for Sybase policies.
Caution NetBackup tape duplication must be performed with the multiplex option
when Sybase ASE striping and NetBackup multiplex (MPX) is used for a Sybase
ASE backup. The problem occurs when multiple Sybase ASE 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 (accessible as the Preserve multiplexing checkbox on
the Duplicate Backup Images window). In addition, all of the backups from the
original Sybase ASE multiplexing session must be included in the duplicated
multiplexed group.
If multiplexing striped Sybase ASE database backups, you may require a special
configuration to restore them. By default, when restoring from multiplexed backups,
Media Manager uses twelve data buffers. This is enough unless you are using more than
twelve stripes. If you are using more than twelve stripes, increase the number of data
buffers used by Media Manager as follows.
1. Create the following file on the NetBackup master that has the storage unit.
For a UNIX master server, enter the following:
install_path/netbackup/db/config/NUMBER_DATA_BUFFERS_RESTORE
For a Windows master server, enter the following:
install_path\NetBackup\db\config\NUMBER_DATA_BUFFERS_RESTORE
2. Specify the number of buffers. This number will be the only entry in the file.
▼ Example Sybase SQL script for a Striped Dump for Sybase ASE
dump database mydb to "sybackup::"
stripe on "sybackup::"
stripe on "sybackup::"
go
Note Refer to “Instructions for Modifying Backup Scripts for Use with Sybase ASE” on
page 57 for further details.
Chapter 3, Configuration 65
Enabling Striped Dumps and Loads
▼ Example Sybase SQL script for a Striped Load for Sybase ASE
load database mydb from
"sybackup::SYBASE11.mydb.D.0.27997.20-10-1997.10:55:52"
stripe on "sybackup::SYBASE11.mydb.D.1.27999.20-10-1997.10:55:52"
stripe on "sybackup::SYBASE11.mydb.D.2.28001.20-10-1997.10:55:52"
go
Note Refer to “Instructions for Modifying Restore Scripts for Use with Sybase ASE” on
page 60 for further details.
3. In the left pane, click Policies. The policy list appears in the right pane.
The Schedules pane contains the name of a schedule (or schedules) configured for the
policy you are going to test. The Clients pane contains the name of the client(s) listed
in the policy you are going to test.
Chapter 3, Configuration 67
Testing NetBackup for Sybase on UNIX Configuration Settings
If the manual backup does not exit with a successful status, refer to the
Troubleshooting chapter.
4. In the All Policies pane, click the policy you wish to test.
The Schedules pane contains the name of a schedule (or schedules) configured for the
policy you are going to test. The Clients pane contains the name of the client(s) listed
in the policy you are going to test.
If the manual backup does not exit with a successful status, refer to the
Troubleshooting chapter.
Chapter 3, Configuration 69
Testing NetBackup for Sybase on UNIX Configuration Settings
Caution Always specify the correct Sybase backup script when configuring automatic
backups or when starting operations through NetBackup. NetBackup for
Sybase on UNIX will not generate an error if a restore Sybase backup script file
is used for a backup operation or a backup Sybase backup script is used for a
restore operation.
71
Performing a Backup
Performing a Backup
There are two types of Sybase ASE backups: full and incremental.
◆ A full backup is a copy of the entire database, including both the data and transaction
log. This is accomplished by performing a database dump.
◆ An incremental backup is a copy of the transaction log that contains the database
changes made since the last database or transaction log dump. You can run a
transaction log dump only if the database stores its log on a separate segment.
To ensure consistent and accurate backups, always use the DBCC command to check
database consistency before backing up a database. The DUMP command can complete
successfully even if your database is corrupt.
Backup Strategy
Note This backup strategy is an example. For guidelines on developing your own backup
and recovery plan, refer to the SYBASE SQL Server System Administration Guide.
One of the major tasks in developing a backup plan is to determine how often to back up
your databases. The frequency of your backups determines how much work you can save
in the event of a media failure. Dump each database just after you create it to provide a
base point, and then dump it on a fixed schedule thereafter.
An example database backup strategy follows:
2. Back up your important Sybase files every Friday night at the same time as the
full-database backup. If desired, you can schedule additional backups for them at
other times. See “Creating a Standard Policy” on page 55 .
4. For further protection, Sybase recommends that you save all the important Sybase
scripts. This includes scripts that contain the disk init, create database, and
alter database commands.
5. 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 and so on.
User-Directed Backup
The following describes how to use xbp to back up your database. Refer to the NetBackup
User’s Guide - UNIX for detailed instructions on using xbp to back up the database.
3. In the Directory to Search Box, type the path name of the location of the Sybase
backup scripts. For example:
install_path/netbackup/ext/db_ext/sybase/scripts/
4. Choose File > Browse File System for Sybase Backup Scripts.
6. Choose Backup > Backup Database Using Selected Scripts. The xbp_confirm dialog
is displayed.
7. Click OK.
A NetBackup process called bphdb starts the Sybase backup script on the client.
Note Refer to “Instructions for Modifying Backup Scripts for Use with Sybase ASE” on
page 57 for further details.
See the SYBASE SQL Server System Administration Guide for details on using the isql
utility.
Browsing Backups
The following describes how to use xbp to browse your database backups. Refer to the
NetBackup User’s Guide - UNIX for detailed instructions on using xbp to browse database
backups.
f. From the File menu, select Browse Backups (Restore). A list of backup images
will appear in the dialog.
The -t 7 on this command specifies the Sybase backups (dumps). The -R on this
command specifies recursive listing.
Refer to the bplist(1M) man page for more information on this command.
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
/.
Performing a Restore
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:
3. In the Directory to Search Box, type in the path name of the location of the Sybase
backup scripts. For example:
install_path/netbackup/ext/db_ext/sybase/scripts/
4. Choose File > Browse File System for Restore Scripts. The xbp dialog is displayed.
6. Choose Restore > Restore Database Using Selected Scripts. The xbp_confirm dialog
is displayed.
7. Click OK.
A NetBackup process called bphdb starts the Sybase backup script on the client.
1. Ensure that the NetBackup server is configured to allow the redirected restore (see the
NetBackup System Adminstrator’s Guide - Windows NT/2000 or the NetBackup System
Administrator’s Guide - UNIX).
2. Specify either of the following (if you specify both, NetBackup considers them in the
order listed).
- Specify client name on the Sybase ASE LOAD command with the -CLIENT and
-SERV option. For example, the following command specifies saturn as the client
to browse:
load database mydb from "sybackup::SYBASE.mydb.D.0.14693.12-12-1997.09:28:37 -SERV candytuft
CLIENT saturn"
go
81
NetBackup and NetBackup for Sybase on UNIX Logs
% cd install_path/netbackup/logs
% mkdir sybackup
NetBackup for Sybase on UNIX sends an informational message that specifies the
dump-file name to Sybase Backup Server.
The following sections describe the logs created when you create the log directories. Use a
text editor to view the contents of the logs.
Chapter 5, Troubleshooting 83
Setting the Debug Level
❖ To change the Debug Level, enter the following line in the bp.conf file.
VERBOSE = 5
ERROR Logging
Sybase Backup Server performs its own error logging in the file that you specify when you
configure Sybase Backup Server. See the SQL Server Configuration Guide for more
information.
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.
Here is an example of a Sybase Backup Server message log that indicates successful DUMP
command completion:
Backup Server: 3.43.1.1: Dump phase number 1 completed.
Backup Server: 3.43.1.1: Dump phase number 2 completed.
Backup Server: 4.58.1.1: Database model: 238 kilobytes DUMPed.
Backup Server: 3.43.1.1: Dump phase number 3 completed.
Backup Server: 4.58.1.1: Database model: 242 kilobytes DUMPed.
Backup Server: 3.42.1.1: DUMP is complete (database model).
Chapter 5, Troubleshooting 85
Preventing Timeout Failures on Large Database Restores
87
Introduction
Introduction
Sybase IQ must be installed before proceeding with the NetBackup for Sybase installation.
Refer to the Sybase IQ Installation and Configuration Guide for details on installing Sybase
IQ.
Additionally, Refer to the following Sybase manuals for any questions or procedures
dealing with Sybase IQ:
◆ Sybase IQ Installation and Configuration Guide
◆ Sybase IQ Administration and Performance Guide
◆ Sybase IQ Reference Manual
◆ Sybase IQ Troubleshooting and Error Messages Guide
Configuration
Create Scripts
Sybase SQL scripts cause SQL Server to send directives to the Sybase IQ Server that
initiate a backup or restore of the specified database. The Sybase dbisql utility
communicates with SQL server. See the Sybase IQ Reference Manual for information about
the dbisql utility.
The following example scripts are included with the NetBackup for Sybase installation:
sybaseiq_backup
sybaseiq_load
sybaseiq_restore
These scripts are installed in the following directory:
/usr/openv/netbackup/ext/db_ext/sybase/scripts/
Although each script can have multiple Sybase operations, a separate script is required for
each type of operation. For example, you need separate scripts for backups and restores.
Caution Always specify the correct script when configuring automatic backups or when
starting operations through NetBackup. NetBackup for Sybase on UNIX will
not generate an error if a restore script is used for a backup operation or a
backup script is used for a restore operation.
1. Create a copy of the sample backup script files. If necessary, move the script files to a
different directory on your client. Sybase script files can be located anywhere on the
client.
a. Use a text editor to open the sybaseiq_backup script. The following example
uses the vi text editor.
vi sybaseiq_backup
The following appears:
#***************************************************************************
# Replace "/db/sybiq12" below with the actual Sybase IQ home directory
#***************************************************************************
SYBASE=/db/sybiq12
#***************************************************************************
# Replace "asiqdemo" below with the actual name of your Sybase IQ database
#***************************************************************************
DATABASE_NAME=asiqdemo
#***************************************************************************
# Replace "sybiqdba" below with the actual name of your Sybase IQ dba
#***************************************************************************
DBA_NAME=sybiqdba
#***************************************************************************
# Replace "syb_files" below with your actual name of the NetBackup
# Standard type class to be used to backup the directory which contains
# the Sybase script files
#***************************************************************************
SYB_FILES_POLICY=syb_files
BACKUP_SQL=syb_${DATABASE_NAME}_dump.sql
#***************************************************************************
# Replace "${SYBASE}/asiq12/scripts" below with your actual path of the Sybase files
#***************************************************************************
SYB_FILES_DIR=${SYBASE}/asiq12/scripts
#***************************************************************************
# Replace "/usr/openv/netbackup/ext/db_ext/sybase/scripts" below with the
# name of the directory which contains the backup script file
#***************************************************************************
SCRIPT_DIR=/usr/openv/netbackup/ext/db_ext/sybase/scripts
#***************************************************************************
# Replace "Full" below with your actual NetBackup schedule name
# which is used for a full backup of the Sybase IQ database.
# Replace "Incremental" below with your actual NetBackup schedule name
# which is used for an incremental backup of the Sybase IQ database.
#***************************************************************************
if [ "${SYBACKUP_SCHED}" = "Full" ]
then
############# NetBackup has started a "Full" backup ##############
DUMP_TYPE=FULL
BACKUP_TYPE=IQ_Full
else
############# NetBackup has started a "Incremental since full" backup ##############
DUMP_TYPE="INCREMENTAL SINCE FULL"
BACKUP_TYPE=IQ_InSF
fi
cp ${SCRIPT_DIR}/${BACKUP_SQL} ${SYBASE}/${BACKUP_SQL}
#***************************************************************************
# Replace "2638" with the actual port number of your Sybase IQ server
# Replace "DBA" with the user id of your Sybase IQ dba
# Replace "SQL" with the password your Sybase IQ dba
#***************************************************************************
echo "su - $DBA_NAME -c $SYBASE/asiq12/bin/dbisql -nogui -port 2638 -c
\"uid=DBA;pwd=SQL;dbn=${DATABASE_NAME}\" ${BACKUP_SQL}"
rm -f ${SYBASE}/${BACKUP_SQL}
if [ "$RETURN_STATUS" -ne 0 ]
then
RETURN_STATUS=6
echo "Backup of Sybase IQ database ${DATABASE_NAME} failed !!!"
else
echo "Backup of Sybase IQ database ${DATABASE_NAME} successful"
fi
if [ "${DUMP_TYPE}" = "FULL" ]
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
SYBASE=/db/sybiq12
SYBASE should get set to the Sybase home directory. This variable will usually get
set to the same value as the SYBASE environmental variable.
DATABASE_NAME=asiqdemo
DATABASE_NAME should be set to the name of the Sybase IQ database that you
want to back up.
DBA_NAME=sybiqdba
DBA_NAME should get set to the name of the Sybase IQ DBA. DBA_NAME will be
used as a system login under which the backup will be initiated.
SYB_FILES_POLICY=syb_files
SYB_FILES_POLICY should be set to the name of the Standard type policy that will
be used to backup files related to Sybase IQ, such as script files.
SYB_FILES_DIR=${SYBASE}/asiq12/scripts
SYB_FILES_ DIR should get set to the name of the directory which contains the files
to be backed up with the SYB_FILES_POLICY policy. This directory will contain files
related to Sybase IQ, such as script files. This directory should not be the directory
containing the actual database.
SCRIPT_DIR=/usr/openv/netbackup/ext/db_ext/sybase/scripts
SCRIPT_DIR should get set to the name of the directory which contains the backup
script file. By default, the NetBackup for Sybase installation will place this file in
/usr/openv/netbackup/ext/db_ext/sybase/scripts.
if [ "${SYBACKUP_SCHED}" = "Full" ]
Full should get set to the name of the schedule in the Sybase type policy on the
NetBackup Server which will be used for full Sybase IQ database backups.
if [ "${SYBACKUP_SCHED}" = "Incremental" ]
Incremental should get set to the name of the schedule in the Sybase type policy on
the NetBackup Server which will be used for incremental Sybase IQ database
backups.
The ON_ERROR option should get set to STOP to prevent Sybase IQ from
prompting for a response from a user. Not setting ON_ERROR=STOP may result in
the backup process hanging should an error occur during the backup.
This line builds the BACKUP command which dbisql will process. You can change
the name of your NetBackup server ($SYBACKUP_SERVER), the name of your
Sybase policy ($SYBACKUP_POLICY), or the name of your Application Backup
type schedule (Default-Application-Backup) to fit your environment.
Also, the -TYPE variable, ${BACKUP_TYPE} can be changed to provide additional
information about the backup in the image name. Please note that the variable
names (-SERV, -POL, -SCHED, and -TYPE) are case sensitive.
This line actually initiates the backup process by calling dbisql. You can change the
port number of the Sybase IQ server that you will be connecting to from the default
port number of 2638. You can also change the user id (DBA) and password (SQL) of
the Sybase IQ user that you will be using to connect to the Sybase IQ server. These
values must match your current Sybase IQ environment. You should change these
values in both the echo line and the actual command initiation line.
1. Create a copy of the sample restore script files. If necessary, move the script files to a
different directory on your client. Sybase script files can be located anywhere on the
client.
a. Use a text editor to open the sybaseiq_restore script. The following example
uses the vi text editor.
vi sybaseiq_restore
The following appears:
#***************************************************************************
# Replace "/db/sybiq12" below with your actual Sybase IQ home directory
#***************************************************************************
SYBASE=/db/sybiq12
#***************************************************************************
# Replace "asiqdemo" below with the actual name of your Sybase IQ server
#***************************************************************************
SERVER_NAME=asiqdemo
#***************************************************************************
# Replace "sybiqdba" below with the actual name of your Sybase IQ dba
#***************************************************************************
DBA_NAME=sybiqdba
#***************************************************************************
# Replace "sybaseiq_load" below with your actual SQL script file name
# which contains the corresponding RESTORE command
#***************************************************************************
LOADDB=sybaseiq_load
RESTORE_SQL=syb_${SERVER_NAME}_restore.sql
#***************************************************************************
# Replace "/usr/openv/netbackup/ext/db_ext/sybase/scripts/" below with the
# name of the directory which contains the RESTORE script file
#***************************************************************************
cp /usr/openv/netbackup/ext/db_ext/sybase/scripts/${LOADDB} ${SYBASE}/${RESTORE_SQL}
#***************************************************************************
# Replace "2638" with the actual port number of your Sybase IQ server
# Replace "dba" with the user id of your Sybase IQ dba for the utility_db
# Replace "sql" with the password your Sybase IQ dba for the utility_db
# The user id and password of the Sybase IQ dba for the utility_db can
# be found in $SYBASE/asiq12/bin/util_db.ini
#***************************************************************************
echo "su - ${DBA_NAME} -c $SYBASE/asiq12/bin/dbisql -nogui -port 2638 -c
\"uid=dba;pwd=sql;dbn=utility_db;eng=${SERVER_NAME}\" ${RESTORE_SQL}"
su - ${DBA_NAME} -c "$SYBASE/asiq12/bin/dbisql -nogui -port 2638 -c
\"uid=dba;pwd=sql;dbn=utility_db;eng=${SERVER_NAME}\" ${RESTORE_SQL}"
RETURN_STATUS=$?
if [ "$RETURN_STATUS" -ne 0 ]
then
echo "Restore of Sybase IQ database ${SERVER_NAME} failed !!!"
else
echo "Restore of Sybase IQ database ${SERVER_NAME} successful"
fi
rm -f ${SYBASE}/${RESTORE_SQL}
exit $RETURN_STATUS
SYBASE=/db/sybiq12
SYBASE should get set to the Sybase home directory. This variable will usually get
set to the same value as the SYBASE environmental variable.
SERVER_NAME=asiqdemo
SERVER_NAME should get set to the name of the Sybase IQ server that you want to
restore.
DBA_NAME=sybiqdba
DBA_NAME should get set to the name of the Sybase IQ DBA. DBA_NAME will be
used as a system login under which the backup will be initiated.
LOADDB=sybaseiq_load
LOADDB should get set to the name of the SQL script file which contains the
RESTORE command. By default, this file is included in the NetBackup for Sybase
installation as sybaseiq_load.
cp /usr/openv/netbackup/ext/db_ext/sybase/scripts/${LOADDB}
${SYBASE}/${RESTORE_SQL}
This line actually initiates the restore process by calling dbisql . You can change the
port number of the Sybase IQ server that you will be connecting to from the default
port number of 2638. You can also change the user id (dba) and password (sql) of the
Sybase IQ user that you will be using to connect to the Sybase IQ server utility_db
database. The user id and password of the utility_db can be found in
$SYBASE/asiq12/bin/util_db.ini. These values must match your current Sybase IQ
environment. You should change these values in both the echo line and the actual
command initiation line.
a. Use a text editor to open the sybaseiq_load script. The following example uses
the vi text editor
vi sybaseiq_load
The following appears:
SET TEMPORARY OPTION ON_ERROR=STOP;
RESTORE DATABASE ’/db/sybiq12/asiq12/demo/asiqdemo.db’ FROM
’sybackup::asiqdemo.asiqdemo.db.IQ_Full.0.4261.02-12-2001.10:14:37 -SERV nbu_server’;
RESTORE DATABASE ’/db/sybiq12/asiq12/demo/asiqdemo.db’ FROM
’sybackup::asiqdemo.asiqdemo.db.IQ_InSF.0.4261.03-12-2001.11:04:37 -SERV nbu_server’;
b. Modify the script. This sample script shows two backup files being restored, a full
backup and an incremental (or incremental since full) backup.
Refer to the following table.
The ON_ERROR option should get set to STOP to prevent Sybase IQ from
prompting for a response from a user. Should an error occur during the backup, not
setting ON_ERROR=STOP may result in the backup process hanging up.
/db/sybiq12/asiq12/demo/asiqdemo.db
This file name should be the name of the Catalog Store file that you will be restoring.
asiqdemo.asiqdemo.db.IQ_Full.0.4261.02-12-2001.10:14:37
This will be the file name for the dump image. This name can be derived from the
output from output from the bplist command. See “Using bplist to Browse” on
page 76 for further details.
nbu_server
This will be the name of the NetBackup server from which to retrieve the dump
image.
Shared Memory
Please review the readme file for the latest information about using shared memory for
performing backups or restores.
Performing a Backup
There are three types of Sybase IQ backups: full, incremental, and incremental since full.
◆ FULL - a full backup is a copy of the entire Sybase IQ database.
◆ INCREMENTAL - An incremental backup is a copy of the data that has changed since
the last full or incremental backup.
◆ INCREMENTAL SINCE FULL - An incremental since full backup is a copy of the data
that has changed since the last full backup.
To ensure consistent and accurate backups, always use the sp_iqcheckdb command to
check database consistency before backing up a database. The BACKUP command can
complete successfully even if your database is corrupt.
For further information on backup strategies, review the Backup and Data Recovery
chapter in the Sybase IQ Administration and Performance Guide.
The procedures for performing an automatic, manual, or user-directed (xbp) backup are
the same for Sybase IQ as for Sybase ASE. However, you will use the sybaseiq_backup
script file to perform the backup instead of the sybase_mydb_backup script file used by
Sybase ASE. In addition, you can also use Interactive SQL to perform a backup.
1. Log onto the Sybase IQ server / database with a user id which has DBA privileges.
Performing a Restore
Review the section “Restoring your Database” in the Backup and Data Recovery chapter
of the Sybase IQ Administration and Performance Guide carefully before attempting to restore
a Sybase IQ database.
The procedures for performing a restore are the same for Sybase IQ as for Sybase ASE.
However, you will use the sybaseiq_restore script file to perform the restore instead
of the sybase_mydb_restore script file used by Sybase ASE.
In addition, you can also use Interactive SQL to perform a restore. See “Using Interactive
SQL to Perform a Restore.”
1. Make sure that there are no users connected to the database being restored.
2. Make sure that the Catalog Store and the transaction log do not exist for a full restore.
3. Start the Sybase IQ utility database, utility_db. See the Sybase IQ Installation and
Configuration Guide for details on the utility database.
4. Check the file backup.syb for the date and time of the backups that you want to
restore. See the Backup and Data Recovery chapter in the Sybase IQ Administration and
Performance Guide for further details on the backup.syb file.
5. Browse the backup history on the NetBackup Server to get the actual names of the
backup files which correspond to the backups that you want to restore. See “Browsing
Backups” on page 75 for more information.
1. Make sure that there are no users connected to the database being restored.
2. Make sure that the Catalog Store and the transaction log do not exist for a full restore.
3. Start the Sybase IQ utility database, utility_db, and connect to the utility_db using the
user id and password from the util_db.ini file. See the Sybase IQ Installation and
Configuration Guide for details on the utility database.
4. Check the file backup.syb for the date and time of the backup(s) that you want to
restore. See the Backup and Data Recovery chapter in the Sybase IQ Administration and
Performance Guide for further details on the backup.syb file.
5. Browse the backup history on the NetBackup Server to get the actual names of the
backup file(s) which correspond to the backup(s) that you want to restore. See
“Browsing Backups” on page 75 for more information.
Troubleshooting
The steps for troubleshooting NetBackup for Sybase are the same for Sybase IQ as for
Sybase ASE. Review “Troubleshooting” on page 81 for details.
In addition, the Sybase IQ file backup.syb contains information on successful backup or
restore operations. For details about the contents and format of the backup.syb file,
consult the Sybase IQ Administration and Performance Guide.
The Sybase IQ message file is specified with the -o option when the Sybase IQ server is
started. This message file may also provide information about problems that are
experienced during backups or restores.
103
Admin Console for Windows 34 Dump image 7
Client Read Timeout 86 file naming conventions 7
Commands Dump-device string 7
backupserver 85
E
bpbackup 8
Environmental variables 62
bprestore 8
Error
DBCC 72
logging 85
DUMP 85
messages 85
LOAD 85
script name 56
Configuration
Examples
bp.conf file 63
schedule for other Sybase files 72
database debug level 84
Execution log 83
environmental variables 62
LOAD command 61 F
media manager 23, 39 File list
standard policy 37, 55 example for Sybase policy 35, 54
striped dumps and loads 65 Full backup 4
UNIX 38 G
Windows 22 get_license_key 12, 17
D Glossary. See NetBackup Help.
Data buffers 65 I
DBCC command 72 Image
Debug logs dump 7
description 82 Incremental backup
dump file name 82 Automatic-scheduled backups 4
Default-Application-Backup schedule Informational messages 85
automatic backups, Admin Console for Inline Tape Copy
UNIX 45 configuring 33, 50
automatic backups, Admin Console for Install
Windows 29 NetBackup client software 10
configuration, Admin Console for NetBackup server software 10
UNIX 45 install_dbext 12, 16, 18
configuration, Admin Console for Installation
Windows 29 local 17
Diagnosis tracking 85 prerequisites 10
Directory upgrade 14
bphdb for error messages 85 isql utility 8
debug log 82 Sybase script 56
SYBASE_HOME 64
xbp J
directory to search 73, 77 jnbSA 38
DUMP command L
definition 5 Library, NetBackup for Sybase
dump-device string 7 Sybase Backup server
executing 74 NetBackup library 7
function on servers 6 License key 11, 17
Dump file LOAD command 61
debug log 82 definition 5
Index 105
description 6 T
dump-file name 82 Tape duplication 65
error logging 85 Testing (manual backup) 67
example message log 85 Testing policy configuration
NetBackup backup 8 Admin Console for UNIX 68
parrallel dumps and loads 65 Admin Console for Windows 67
Sybase IQ Troubleshooting logs 82
configuration 89
U
using 87
update_dbclients 13, 14
Sybase SQL Server
Upgrade installation 14
definition 5
User-directed backup, and restore
sysdatabases 72
definition 4
sysdevices tables 72
syslogins 72 X
sysusages 72 xbp
backup procedure 73
restore procedure 77