NetBackup10 AdminGuide Informix

Download as pdf or txt
Download as pdf or txt
You are on page 1of 60

NetBackup™ for Informix

Administrator's Guide

for UNIX and Linux

Release 10.0
NetBackup™ for Informix Administrator's Guide
Last updated: 2022-02-23

Legal Notice
Copyright © 2022 Veritas Technologies LLC. All rights reserved.

Veritas, the Veritas Logo, and NetBackup are trademarks or registered trademarks of Veritas
Technologies LLC or its affiliates in the U.S. and other countries. Other names may be
trademarks of their respective owners.

This product may contain third-party software for which Veritas is required to provide attribution
to the third party (“Third-party Programs”). Some of the Third-party Programs are available
under open source or free software licenses. The License Agreement accompanying the
Software does not alter any rights or obligations you may have under those open source or
free software licenses. Refer to the Third-party Legal Notices document accompanying this
Veritas product or available at:

https://www.veritas.com/about/legal/license-agreements

The product described in this document is distributed under licenses restricting its use, copying,
distribution, and decompilation/reverse engineering. No part of this document may be
reproduced in any form by any means without prior written authorization of Veritas Technologies
LLC and its licensors, if any.

THE DOCUMENTATION IS PROVIDED "AS IS" AND ALL EXPRESS OR IMPLIED


CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED
WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH
DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. Veritas Technologies LLC SHALL
NOT BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES IN CONNECTION
WITH THE FURNISHING, PERFORMANCE, OR USE OF THIS DOCUMENTATION. THE
INFORMATION CONTAINED IN THIS DOCUMENTATION IS SUBJECT TO CHANGE
WITHOUT NOTICE.

The Licensed Software and Documentation are deemed to be commercial computer software
as defined in FAR 12.212 and subject to restricted rights as defined in FAR Section 52.227-19
"Commercial Computer Software - Restricted Rights" and DFARS 227.7202, et seq.
"Commercial Computer Software and Commercial Computer Software Documentation," as
applicable, and any successor regulations, whether delivered by Veritas as on premises or
hosted services. Any use, modification, reproduction release, performance, display or disclosure
of the Licensed Software and Documentation by the U.S. Government shall be solely in
accordance with the terms of this Agreement.

Veritas Technologies LLC


2625 Augustine Drive
Santa Clara, CA 95054

http://www.veritas.com
Technical Support
Technical Support maintains support centers globally. All support services will be delivered
in accordance with your support agreement and the then-current enterprise technical support
policies. For information about our support offerings and how to contact Technical Support,
visit our website:

https://www.veritas.com/support

You can manage your Veritas account information at the following URL:

https://my.veritas.com

If you have questions regarding an existing support agreement, please email the support
agreement administration team for your region as follows:

Worldwide (except Japan) [email protected]

Japan [email protected]

Documentation
Make sure that you have the current version of the documentation. Each document displays
the date of the last update on page 2. The latest documentation is available on the Veritas
website:

https://sort.veritas.com/documents

Documentation feedback
Your feedback is important to us. Suggest improvements or report errors or omissions to the
documentation. Include the document title, document version, chapter title, and section title
of the text on which you are reporting. Send feedback to:

[email protected]

You can also see documentation information or ask a question on the Veritas community site:

http://www.veritas.com/community/

Veritas Services and Operations Readiness Tools (SORT)


Veritas Services and Operations Readiness Tools (SORT) is a website that provides information
and tools to automate and simplify certain time-consuming administrative tasks. Depending
on the product, SORT helps you prepare for installations and upgrades, identify risks in your
datacenters, and improve operational efficiency. To see what services and tools SORT provides
for your product, see the data sheet:

https://sort.veritas.com/data/support/SORT_Data_Sheet.pdf
Contents

Chapter 1 Introduction to NetBackup for Informix ......................... 6


Features of NetBackup for Informix .................................................... 6
About NetBackup for Informix ........................................................... 8
About NetBackup for Informix terms ................................................... 8
Example NetBackup for Informix configuration ..................................... 9
About the Informix ON-bar utility and library ....................................... 10
How NetBackup for Informix works ................................................... 10

Chapter 2 Installing NetBackup for Informix .................................. 12


Planning the installation of NetBackup for Informix ............................. 12
Verifying the operating system and platform compatibility ...................... 13
NetBackup server and client requirements ......................................... 13
Informix server software requirements .............................................. 14
About the license for NetBackup for Informix ...................................... 14
Specifying the Informix home path ................................................... 14
Adding new Informix instances ........................................................ 15

Chapter 3 Configuring NetBackup for Informix ............................. 16


About configuring NetBackup for Informix .......................................... 16
About configuring a backup policy for Informix ................................... 17
Adding a NetBackup for Informix policy ....................................... 17
About policy attributes ............................................................. 18
Configuring an application backup schedule ................................ 19
Configuring automatic backup schedules .................................... 19
About schedule properties ....................................................... 20
Adding clients to a policy .......................................................... 23
Adding NetBackup for Informix scripts to the backup selections
list ................................................................................. 24
Rules for NetBackup for Informix scripts ...................................... 26
Configuring a Standard policy for backup of the $INFORMIXDIR/etc
files ............................................................................... 26
About NetBackup for Informix scripts ................................................ 27
Modifying NetBackup for Informix scripts ..................................... 28
About NetBackup for Informix environment variables ..................... 31
Contents 5

Configuring an additional bp.conf file ................................................ 32


About permissions for NetBackup for Informix log files ......................... 33
Reviewing the auto-discovered mappings in Host Management ............. 33
Configuring the Maximum jobs per client ........................................... 35
Performing a manual backup .......................................................... 36

Chapter 4 Performing backups and restores of Informix ........... 38


About using NetBackup for Informix ................................................. 38
About Informix ON-Bar backup types ................................................ 39
Example Informix backup strategy ................................................... 39
Automatic backup policy for Informix ................................................ 40
Manual backup policy for Informix .................................................... 40
Using the onbar command to perform a user-directed backup ................ 40
About browsing Informix backups .................................................... 41
Restoring files to the original client ................................................... 41
Redirecting an Informix restore to a different client .............................. 42
Example restore of an Informix database ........................................... 45

Chapter 5 Troubleshooting ................................................................. 49

Verifying the NetBackup for Informix configuration ............................... 49


Verifying NetBackup for Informix log files ........................................... 50
Enabling the debug logs manually ................................................... 53
About the NetBackup for Informix log files ......................................... 54
About the bphdb directory on the database client .......................... 54
About the infxbsa directory on the database client ......................... 54
About NetBackup server reports ...................................................... 54
Setting the debug level .................................................................. 55
Minimizing timeout failures on large database restores ......................... 55
Minimizing the loading and unloading of tapes for database backups
........................................................................................... 56
Deleting expired backups from the Informix backup database ................ 56

Appendix A Register authorized locations ........................................ 58

Registering authorized locations used by a NetBackup database


script-based policy .................................................................. 58
Chapter 1
Introduction to NetBackup
for Informix
This chapter includes the following topics:

■ Features of NetBackup for Informix

■ About NetBackup for Informix

■ About NetBackup for Informix terms

■ Example NetBackup for Informix configuration

■ About the Informix ON-bar utility and library

■ How NetBackup for Informix works

Features of NetBackup for Informix


Table 1-1 shows NetBackup for Informix’s main features and introduces some terms
that are used in this documentation.

Table 1-1 NetBackup for Informix features and descriptions

Feature Description

Media and device All the devices supported by Media Manager are available to
management NetBackup for Informix.
Introduction to NetBackup for Informix 7
Features of NetBackup for Informix

Table 1-1 NetBackup for Informix features and descriptions (continued)

Feature Description

Scheduling facilities NetBackup scheduling facilities on the master server can be used
to schedule automatic and unattended Informix backups.

This feature also lets you choose the times when these operations
can occur. For example, to prevent interference with normal daytime
operations, you can schedule your database backups to occur only
at night.

Multiplexed backups NetBackup for Informix lets you take advantage of NetBackup’s
and restores multiplexing capabilities. Multiplexing directs multiple data streams
to one backup device, thereby reducing the time necessary to
complete the operation.

Transparent Informix All backups and restores run simultaneously and transparently
and regular file system without any action from the NetBackup administrator.
backup and restore
The database administrator can run database backup and restore
operations
operations through NetBackup. An administrator or any other
authorized user can use NetBackup to run database backups and
restores.

Alternatively, you can use the Informix ON-Bar utility as if NetBackup


were not present.

Sharing the same It is possible to share the same devices and media that is used for
storage units that are other backups or to give Informix exclusive use of certain devices
used for other file and media. NetBackup for Informix can use Media Manager, disk,
backups and Media Server Deduplication Pool (MSDP) storage units.

Centralized and From the NetBackup master server, you can schedule database
networked backup backups or start them manually for any client. The Informix
operations databases can also reside on hosts that are different from the
devices on which NetBackup stores the backups.

Graphical user NetBackup provides the following user interfaces:


interfaces
■ NetBackup Administration Console
■ Backup, Archive, and Restore user interface

A database administrator or NetBackup administrator can start


backup or restore operations for Informix from the NetBackup
graphical user interface on the master server.

A NetBackup administrator can start backup or restore operations


for Informix from the NetBackup graphical user interface on the
master server.
Introduction to NetBackup for Informix 8
About NetBackup for Informix

Table 1-1 NetBackup for Informix features and descriptions (continued)

Feature Description

Parallel backup and NetBackup for Informix supports the parallel backup and restore
restore operations capabilities of Informix. For example, this permits the user to run
more than one tape device at a time for a single Informix backup
or restore. This usage can reduce the time necessary to complete
the operation.

Compression Compression increases backup performance over the network and


reduces the size of the backup image that NetBackup writes to the
storage unit.

About NetBackup for Informix


NetBackup for Informix integrates the database backup and recovery capabilities
of the Informix ON-Bar utility with the backup and the recovery management
capabilities of NetBackup and its media manager.
This topic introduces NetBackup for Informix, and it explains how this agent relates
both to the Informix ON-Bar utility and NetBackup.

About NetBackup for Informix terms


Table 1-2 lists the terms that may be new to an Informix database administrator or
a NetBackup administrator.

Table 1-2 Terminology

Term Meaning

Informix ON-Bar utility The Informix ON-Bar utility lets database administrators back up
and restore Informix databases on UNIX systems. However, this
utility does not directly manage storage devices and media. The
Informix ON-Bar utility must be integrated with a media management
system that can access devices and keep information about the
media used in Informix database backups. NetBackup for Informix
provides this media-management capability by integrating the utility
with NetBackup.

onbar More information about this command is available. The onbar


command starts a backup or restore with the Informix ON-Bar utility.

See the IBM Informix Backup and Restore Guide.


Introduction to NetBackup for Informix 9
Example NetBackup for Informix configuration

Table 1-2 Terminology (continued)

Term Meaning

ON-Bar scripts A Bourne-shell script that contains onbar commands.

onsmsync The onsmsync utility is an Informix version XPS 8.x, IDS 9.x, and
later feature that synchronizes the NetBackup catalog with the
Informix backup catalog. The onsmsync utility deletes images from
both Informix backup catalogs and NetBackup catalogs. For more
information, see your IBM Informix documentation.

Example NetBackup for Informix configuration


The server that hosts the Informix database must be a NetBackup client. It must
have NetBackup for Informix and the Informix ON-Bar utility installed.
Figure 1-1 shows the major components in a NetBackup for Informix configuration.

Figure 1-1 Major components in a NetBackup for Informix configuration


System hosting the Informix database

NetBackup for Informix supplies:

– Vendor I/O library


– Sample configuration program
Informix database – Sample script files

Additional NetBackup software:


Informix database software supplies:
– NetBackup client (required)
– Informix ON-Bar Utility

Network (TCP/IP)

NetBackup master server


or remote media server Storage unit

NetBackup software:
– NetBackup master server or media server
Introduction to NetBackup for Informix 10
About the Informix ON-bar utility and library

About the Informix ON-bar utility and library


During a backup or restore, the Informix ON-Bar utility provides the interface to the
databases and performs the actual extraction and insertion of data.
To start a database backup or restore, the database administrator runs a command
called onbar. This command, which is part of the Informix ON-Bar utility, can be
executed from the command line, from an ON-Bar script, or from an application
such as NetBackup. An ON-Bar script includes the onbar command to be executed
and defines the database objects to be backed up or restored.
During a backup or restore, the Informix ON-Bar utility controls the data streams
going into or out of a database. To access the storage devices, this utility must be
integrated with a media-management system such as the one provided by
NetBackup and its Media Manager.
The onbar command is documented in the IBM Informix Backup and Restore Guide.
Instructions are available for how to find the supported Informix version level.
See “Verifying the operating system and platform compatibility” on page 13.
NetBackup for Informix has a special library that contains the functions necessary
for the Informix ON-Bar utility to use NetBackup.

How NetBackup for Informix works


You can run an ON-Bar script in one of the following ways:
■ Automatically, from the NetBackup scheduler
■ From the NetBackup administration interface on the NetBackup master server
■ From the command line on the NetBackup client
With the exception of the command-line method, a NetBackup process named
bphdb starts the ON-Bar script on the client.

The following events occur for a backup:


■ The onbar command starts the requested operation on the databases.
■ If the process requires media to store backup data, onbar starts a user-directed
backup by issuing a backup request.
■ The NetBackup media server connects to ON-Bar through the NetBackup library
on the client and transfers the database data to secondary storage.
A restore works in essentially the same manner except that onbar issues a restore
request. This action causes NetBackup to retrieve the data from secondary storage
and send it to NetBackup for Informix on the client.
Introduction to NetBackup for Informix 11
How NetBackup for Informix works

The status for an ON-Bar operation is logged in the Informix BAR_ACT_LOG. A


database administrator can use this log to determine if a backup or restore was
successful.
NetBackup also logs status, but only for its own part of the operation. This debug
log is located in the following directory:

/usr/openv/netbackup/logs/infbsa

A database administrator cannot use NetBackup status to determine whether


ON-Bar was successful because errors can occur in ON-Bar that do not affect
NetBackup and are not recorded in its logs.
Chapter 2
Installing NetBackup for
Informix
This chapter includes the following topics:

■ Planning the installation of NetBackup for Informix

■ Verifying the operating system and platform compatibility

■ NetBackup server and client requirements

■ Informix server software requirements

■ About the license for NetBackup for Informix

■ Specifying the Informix home path

■ Adding new Informix instances

Planning the installation of NetBackup for Informix


Table 2-1 shows the major installation steps needed to run NetBackup for Informix.

Table 2-1 Installation steps for NetBackup for Informix

Step Action Description

Step 1 Verify the installation prerequisites. See “Verifying the operating system and platform
compatibility” on page 13.

http://www.netbackup.com/compatibility

See “NetBackup server and client requirements” on page 13.

See “Informix server software requirements” on page 14.


Installing NetBackup for Informix 13
Verifying the operating system and platform compatibility

Table 2-1 Installation steps for NetBackup for Informix (continued)

Step Action Description

Step 2 Verify that master server has a valid See “About the license for NetBackup for Informix”
license for NetBackup for Informix and on page 14.
any NetBackup options or add-ons that
you want to use.

Step 3 Specify the Informix home path. See “Specifying the Informix home path” on page 14.

Step 4 Add a new database instance. See “Adding new Informix instances” on page 15.

Verifying the operating system and platform


compatibility
Verify that the NetBackup for Informix agent is supported on your operating system
or platform.
To verify operating system and compatibility
1 Go to the NetBackup compatibility list site.
http://www.netbackup.com/compatibility
2 Click on the following document:
Application/Database Agent Compatibility List

NetBackup server and client requirements


Verify that the following requirements are met for the NetBackup server:
■ The NetBackup server software is installed and operational on the NetBackup
server.
See the NetBackup Installation Guide.
■ Make sure that you configure any backup media that the storage unit uses. The
number of media volumes that are required depends on several things:
■ The devices that are used and storage capacity of the media
■ The sizes of the databases that you want to back up
■ The amount of data that you want to archive
■ The size of your backups
■ The frequency of backups or archives
Installing NetBackup for Informix 14
Informix server software requirements

■ The length of retention of the backup images


See the NetBackup Administrator’s Guide, Volume I.
Verify that the following requirements are met for the NetBackup clients:
■ The NetBackup client software is installed on the computer that has the
databases you want to back up.
If the database is clustered, you must use the same version of NetBackup on
each node in the cluster.
■ To use the new features that are included in NetBackup for Informix in NetBackup
10.0, you must upgrade your NetBackup for Informix clients to NetBackup 10.0.
The NetBackup media server must use the same version as the NetBackup for
Informix client or a higher version than the client.

Informix server software requirements


Verify the following regarding the Informix server software on the NetBackup server
or client:
■ Informix server software must be installed and operational.
■ One or more Informix instances must exist.
See “NetBackup server and client requirements” on page 13.

About the license for NetBackup for Informix


The NetBackup for Informix agent is installed with the NetBackup client software.
No separate installation is required. A valid license for the agent must exist on the
master server.
More information is available on how to add licenses.
See the NetBackup Administrator’s Guide, Volume I.

Specifying the Informix home path


After you install NetBackup with a valid license for NetBackup for Informix, run this
script on the computer where the Informix vendor software is installed. With this
script, NetBackup can gather additional information about your Informix environment.
Complete this procedure if you licensed NetBackup for Informix for the first time.
Installing NetBackup for Informix 15
Adding new Informix instances

To specify the Informix home path


1 Change to the following directory:
/usr/openv/netbackup/bin

2 Run the following script:


./informix_config

3 Supply the home path for the database instance.


4 Verify the Informix ON-Bar configuration.
This script creates the following entry in the Informix instance home path’s
etc/sm_versions file for each client.

1|1.1.0|Veritas-NetBackup|1

5 Make sure $BAR_BSALIB_PATH is correctly linked to NetBackup's


infxbsa.[so,sl,a].

See “Verifying the NetBackup for Informix configuration” on page 49.


6 Set the BAR_RETRY configuration parameter to 5.
The configuration parameter BAR_RETRY is used in the
$INFORMIXDIR/etc/$ONCONFIG file. This parameter specifies the number of
times ON-Bar attempts to back up or restore the storage space or logical log
if the first attempt fails. Informix recommends setting BAR_RETRY to 5.

Adding new Informix instances


If you install a new Informix instance after you install NetBackup, you need to add
this new instance to the NetBackup configuration. This action ensures that all new
Informix instances are included in backup operations.
See “Specifying the Informix home path” on page 14.
Chapter 3
Configuring NetBackup for
Informix
This chapter includes the following topics:

■ About configuring NetBackup for Informix

■ About configuring a backup policy for Informix

■ About NetBackup for Informix scripts

■ Configuring an additional bp.conf file

■ About permissions for NetBackup for Informix log files

■ Reviewing the auto-discovered mappings in Host Management

■ Configuring the Maximum jobs per client

■ Performing a manual backup

About configuring NetBackup for Informix


Before you configure NetBackup for Informix, complete the installation procedure.
After you complete the installation procedure, complete the procedures in Table 3-1
to configure your environment.

Table 3-1 Steps to configure NetBackup for Informix

Step Action Description

Step 1 Configure a backup policy. See “About configuring a backup


policy for Informix ” on page 17.
Configuring NetBackup for Informix 17
About configuring a backup policy for Informix

Table 3-1 Steps to configure NetBackup for Informix (continued)

Step Action Description

Step 2 Configure NetBackup for Informix See “About NetBackup for Informix
scripts. scripts” on page 27.

Step 3 Configure an additional bp.conf file. See “Configuring an additional


bp.conf file” on page 32.

Step 4 Configure permissions for log files on See “About permissions for
UNIX systems NetBackup for Informix log files”
on page 33.

Step 5 Configure the Maximum jobs per See “Configuring the Maximum jobs
client. per client” on page 35.

Step 6 Test the configuration settings. See “Performing a manual backup”


on page 36.

About configuring a backup policy for Informix


A backup policy for a database defines the backup criteria for a specific group of
one or more clients.
These criteria include the following:
■ Storage unit and media to use
■ Policy attributes
■ Backup schedules
■ Clients to be backed up
■ The script files to run on the clients
To back up the database environment, define at least one Informix-ON-Bar policy
with the appropriate schedules. A configuration can have a single policy that includes
all clients, or there can be many policies, some of which include only one client.
In addition to the Informix-ON-Bar policy, back up the $INFORMIXDIR/etc files that
are specified in the backup scripts. Define a Standard policy with a User Backup
schedule type to back up these files.
See “Adding a NetBackup for Informix policy” on page 17.

Adding a NetBackup for Informix policy


This topic describes how to add a new backup policy for a database.
Configuring NetBackup for Informix 18
About configuring a backup policy for Informix

To add a new NetBackup for Informix policy


1 Log on to the master server as administrator (Windows) or root (UNIX).
2 Start the NetBackup Administration Console.
If your site has more than one master server, choose the one on which you
want to add the policy.
3 Select NetBackup Management > Policies. Then select Actions > New >
Policy.
4 Type a unique name for the new policy and click OK.
5 From the Policy type list, select Informix-ON-Bar.
The Informix-ON-Bar policy type does not appear in the drop-down list unless
your master server has a license for the database agent.
6 Complete the entries on the Attributes tab.
See “About policy attributes” on page 18.
7 Add other policy information as follows:
■ Add schedules.
See “Configuring an application backup schedule” on page 19.
See “Configuring automatic backup schedules” on page 19.
■ Add clients.
See “Adding clients to a policy” on page 23.
■ Add scripts to the backup selections list.
See “Adding NetBackup for Informix scripts to the backup selections list”
on page 24.

8 When you have added all the schedules, clients, and backup selections you
need, click OK.

About policy attributes


With a few exceptions, NetBackup manages the policy attributes set for a database
backup like a file system backup. Other policy attributes vary according to your
specific backup strategy and system configuration.
For more information on policy attributes, see the NetBackup Administrator’s Guide,
Volume I.
Configuring NetBackup for Informix 19
About configuring a backup policy for Informix

Table 3-2 Policy attribute for NetBackup for Informix policies

Attribute Description

Policy type Determines the types of clients that can be backed up with the policy. For Informix databases,
select the policy type Informix-ON-Bar.

Keyword phrase For NetBackup for Informix, the Keyword phrase entry is ignored. However, it can be set
using the environment variable INFXBSA_KEYWORD.

See “About NetBackup for Informix environment variables” on page 31.

Configuring an application backup schedule


A database backup requires an application backup schedule. You cannot perform
backups if this type of schedule is not included in the policy. The NetBackup for
Informix agent automatically creates this schedule and names it
Default-Application-Backup.
The backup window for an application backup schedule must encompass the time
period during which all scheduled jobs and client-initiated jobs can occur. This
window is necessary because the application backup schedule accepts the backup
request from NetBackup for Informix regardless of whether the backup was initiated
from an automatic schedule or from the client. You can choose to set the window
for the application backup schedule for 24 hours per day, seven days per week.
This window ensures that your operations are never locked out due to the application
backup schedule.
To configure an application backup schedule
1 In the Policy dialog box, click the Schedules tab.
To access the Policy dialog box, double-click the policy name in the Policies
list in the NetBackup Administration Console.
2 Double-click the schedule that is named Default-Application-Backup.
3 Specify the other properties for the schedule.
See “About schedule properties ” on page 20.

Configuring automatic backup schedules


If you plan to have NetBackup perform automatic scheduled backups, you need
one or more automatic backup schedules.
Configuring NetBackup for Informix 20
About configuring a backup policy for Informix

To configure an automatic backup schedule


1 On the Policy dialog box, click the Schedules tab.
2 Click New.
3 Specify a unique name for the schedule.
4 Select the Type of backup.
See “NetBackup for Informix backup types” on page 21.
5 Specify the other properties for the schedule.
See “About schedule properties ” on page 20.
6 Click OK.

About schedule properties


This topic describes the schedule properties that have a different meaning for
database backups than for file system backups. Other schedule properties vary
according to your specific backup strategy and system configuration. Additional
information about other schedule properties is available. See the NetBackup
Administrator’s Guide, Volume I.

Table 3-3 Description of schedule properties

Property Description

Type of backup Specifies the type of backup that this schedule can control. The selection list shows only
the backup types that apply to the policy you want to configure.

See “NetBackup for Informix backup types” on page 21.

Schedule type You can schedule an automatic backup in one of the following ways:

■ Frequency
Frequency specifies the period of time that can elapse until the next backup operation
begins on this schedule. For example, assume that the frequency is 7 days and a
successful backup occurs on Wednesday. The next full backup does not occur until the
following Wednesday. Typically, incremental backups have a shorter frequency than full
backups.
■ Calendar
The Calendar option lets you schedule the backup operations that are based on specific
dates, recurring week days, or recurring days of the month.
Configuring NetBackup for Informix 21
About configuring a backup policy for Informix

Table 3-3 Description of schedule properties (continued)

Property Description

Retention The retention period for an application backup schedule refers to the length of time that
NetBackup keeps backup images. The retention period for an automatic schedule controls
how long NetBackup keeps records of when scheduled backups occurred. For example, if
your database is backed up once every Sunday morning, you should select a retention
period of at least 2 weeks.
The type of schedule you select affects the retention period as follows:

■ Frequency-based scheduling
Set a retention period that is longer than the frequency setting for the schedule. For
example, if the frequency setting is set to one week, set the retention period to be more
than one week. The NetBackup scheduler compares the latest record of the automatic
backup schedule to the frequency of that automatic backup schedule. This comparison
is done to determine whether a backup is due. So if you set the retention period to expire
the record too early, the scheduled backup frequency is unpredictable. However, if you
set the retention period to be longer than necessary, the NetBackup catalog accumulates
unnecessary records.
■ Calendar-based scheduling
The retention period setting is not significant for calendar-based scheduling.

Multiple copies If you want to specify multiple copies of a backup for the policy, configure Multiple copies
on the application backup schedule. If using Snapshot Client, also specify Multiple copies
on the automatic schedule.

NetBackup for Informix backup types


Table 3-4 shows the backup schedules you can specify.

Table 3-4 Informix backup types

Backup type Description

Application Backup The Application Backup schedule enables user-controlled


NetBackup operations from the client. These operations include
those initiated from the client and those initiated by an automatic
schedule on the master server. NetBackup uses the Application
Backup schedule when the user starts a backup manually. Configure
at least one Application Backup schedule for each database policy.
The Default-Application-Backup schedule is configured automatically
as an Application Backup schedule.
Configuring NetBackup for Informix 22
About configuring a backup policy for Informix

Table 3-4 Informix backup types (continued)

Backup type Description

Automatic Full Backup An Automatic Full Backup copies all blocks into the backup set. It
skips only the data file blocks that have never been used. Note that
a full backup is not the same as a whole database backup; full is
an indicator that the backup is not incremental.

This type of backup corresponds to an Informix Level-0 backup,


which is a baseline backup.

Automatic Incremental An Automatic Incremental Backup is a backup of only those blocks


Backup that have changed since the last Automatic Full (baseline) backup.
This kind of backup takes less time and space than a full backup
because the Automatic Incremental Backup contains only the
changed data.

This type of backup corresponds to an Informix Level-1 backup.

Example application backup schedule

Note: (Optional) Specify the application backup schedule name in the bp.conf file
on the client.
See “Configuring an additional bp.conf file” on page 32.

Assume the following:


■ Users perform database backup operations during business hours, 08:00 to
13:00.
■ The automatic backups that use this policy start between 18:00 and 22:00.
In this scenario, the application backup schedule must have a start time of 0800
and a duration of 14 hours. Alternatively, the schedule can have two windows each
day; one with a start time of 0800 and duration of 5 hours, and another with a start
time of 1800 and a duration of 4 hours.

Table 3-5 Example settings for a NetBackup for Informix application backup
schedule

Schedule option Setting

Retention 2 weeks

Backup window Sunday through Saturday

00:08:00 - 22:00:00
Configuring NetBackup for Informix 23
About configuring a backup policy for Informix

Example automatic backup schedule


Table 3-6 shows example settings for automatic backup schedules.

Table 3-6 Example settings for NetBackup for Informix automatic backup
schedules

Type of backup Schedule property Setting

Automatic Full Backup Retention 2 weeks

Frequency Every week

Backup window Sunday, 18:00:00 - 22:00:00

Automatic Incremental Retention 1 week


Backup

Frequency Every day

Backup window Sunday through Saturday

18:00:00 - 22:00:00

Adding clients to a policy


The client list contains a list of the clients on which your scripts are run during an
automatic backup or the clients that can send backup requests to the application
schedule. A NetBackup client must be in at least one policy but can be in more than
one.
NetBackup attempts to run each script in the backup selections list for each client
in the client list. If a script is not valid on a particular client, the script is skipped.
(For example, if the Oracle home that is specified in the script does not exist on
that client.) A policy can contain multiple clients and multiple scripts. Only a subset
of the scripts needs to be valid on each client. If the valid scripts are successful,
the entire backup is successful.
For a NetBackup for Informix policy, clients you want to add must have the following
items installed or available:
■ Informix
■ NetBackup client or server
■ The backup or restore scripts
■ The backup or restore scripts
■ The backup shell scripts
Configuring NetBackup for Informix 24
About configuring a backup policy for Informix

To add clients to a policy


1 Open the policy you want to edit or create a new policy.
To access the Policy dialog box, double-click the policy name in the Policies
list in the NetBackup Administration Console.
2 Click the Clients tab and click New.
3 Type the name of the client and select the hardware and operating system of
the client.
If Informix is installed in a cluster, specify the virtual name of the Informix server
as the client name.

Note: If you installed NetBackup on more than one node in the Informix cluster,
you must perform additional configuration.
See “Reviewing the auto-discovered mappings in Host Management”
on page 33.

4 Choose one of the following:


■ To add another client, click Add.
■ If this client is the last client you want to add, click OK.

5 In the Policy dialog box, click OK.

Adding NetBackup for Informix scripts to the backup selections list


The backup selections list in a database policy is different from the list in
non-database policies. For example, in a Standard or MS-Windows policy, the list
contains files and directories to be backed up. In a database policy, you specify
scripts to be run.
Add scripts to the backup selections list only if you want to create a policy for
automatic backups. In that case, add the scripts to a policy that has automatic
backup schedules. NetBackup runs the scripts in the order that the scripts appear
in the backup selections list.
Configuring NetBackup for Informix 25
About configuring a backup policy for Informix

To add scripts to the backup selections list


1 Ensure that the script resides on the client.
See “Registering authorized locations used by a NetBackup database
script-based policy” on page 58.
2 Open the Policy dialog box.
To access the Policy dialog box, double-click the policy name in the policies
list in the NetBackup Administration Console.
3 Click the Backup Selections tab.
4 Click New.
5 In the Script box, type the full path name of a script on the client.
For example:

/usr/openv/netbackup/ext/db_ext/backup.sh

6 Click Add.
7 Choose one of the following:
■ To add another script, repeat step 5 and step 6.
■ If this client is the last script you want to add, click OK.

8 Click OK.
To browse for scripts to add to the backup selections list
1 Ensure that the script resides on the client.
See “Registering authorized locations used by a NetBackup database
script-based policy” on page 58.
2 In the Policy dialog box, click the Backup Selections tab.
To access the Policy dialog box, double-click the policy name in the policies
list in the NetBackup Administration Console.
3 Click New.
4 Click Browse.
5 Navigate to and select the script file, then click OK.
6 Choose one of the following:
■ To add another script, repeat step 4 and step 5.
■ If this client is the last script you want to add, click OK.

7 Click OK.
Configuring NetBackup for Informix 26
About configuring a backup policy for Informix

Rules for NetBackup for Informix scripts


Observe the following when you use scripts:
■ To ensure that scripts run successfully on all clients, ensure that:
■ The scripts reside on each client in the client list and in the same location
on each client
■ The script location is registered.
See “Registering authorized locations used by a NetBackup database
script-based policy” on page 58.
■ That NetBackup can access the location.
■ If you use NetBackup for Informix in a cluster, that the scripts reside in a
location that is available after a failover.

■ NetBackup installs sample scripts when you install the software; you can modify
these scripts for your own use. Write the scripts to a location outside of the
original installation location. This action ensures that future NetBackup upgrades
do not overwrite your site’s scripts.
See “About NetBackup for Informix scripts” on page 27.

Configuring a Standard policy for backup of the $INFORMIXDIR/etc


files
In addition to the Informix policy, you also must configure a Standard type policy.
A Standard policy enables the backup of the $INFORMIXDIR/etc files that is specified
in the scripts.
Note the following:
■ You must specify the name of the policy in the backup scripts that you modify
on the client.
■ You do not need to configure a file list for this policy because the policy uses a
User Backup type schedule.
To configure a Standard policy
1 Add a new policy.
See "Configuring a NetBackup Policy."
2 Specify the general attributes for the policy.
■ Select Standard for the policy type.
■ Specify other attributes as desired.
Configuring NetBackup for Informix 27
About NetBackup for Informix scripts

3 Add a schedule.
Provide the following information.

Name Type the name of your schedule.

Type of Backup Select User Backup.

A User Backup schedule enables user controlled NetBackup


operations performed on the client.

Retention Set the time period that is needed to retain two full backups
of your database.

For example, if your database is backed up once every Sunday


morning, select a retention period of at least two weeks.

Start Window Set the time of day when you want backup operations to be
available to the user.

Set this window to the same time periods as the Application


Backup schedule in the Informix-ON-Bar policy.

4 Specify the clients to be backed up.


The client must have both Informix and NetBackup for Informix installed.
5 Click OK.

About NetBackup for Informix scripts


The NetBackup installation software writes Informix scripts to the following directory:

/usr/openv/netbackup/ext/db_ext/informix/scripts

For more information on ON-Bar scripts, see your Informix documentation.


Be sure to modify these scripts for your environment. Although each script can
perform multiple ON-Bar operations, each type of operation requires a separate
script. For example, you need separate scripts for backups and restores.

Note: Always specify the correct script when you configure automatic backups or
when you start operations through NetBackup. NetBackup for Informix does not
generate an error if a restore script is used for a backup operation or a backup
script is used for a restore operation.

The NetBackup for Informix installation software includes the following example
scripts:
Configuring NetBackup for Informix 28
About NetBackup for Informix scripts

■ informix_dbspace_list

■ informix_logical_log_backup

■ informix_onbar_backup_of_dbspace1

■ informix_onbar_backup_of_rootdbs

■ informix_onbar_backup_of_rootdbs_and_dbspace1

■ informix_onbar_backup_using_file_list

■ informix_onbar_restore_dbspace1

■ informix_onbar_restore_rootdbs

■ infx_remove_expired_backup

Modifying NetBackup for Informix scripts


The following procedure shows how to modify a script. Repeat this procedure for
each script that you modify.
To modify NetBackup for Informix scripts
1 Copy the example scripts from
/usr/openv/netbackup/ext/db_ext/informix/scripts to a different location
on your client.
The Informix scripts can reside anywhere on the client. Do not store your scripts
in the sample directory because your modifications are lost if you upgrade or
reinstall. Always relocate your scripts to a safe location. In a NetBackup cluster,
the script must be available after a failover.
2 Enable proper permissions on the script files so NetBackup can access the
script files.
Set the access permissions of the scripts to 775. For example:

chmod 775 script_name

3 Open the script file with a text editor.


For example, use the following command to modify the
informix_onbar_backup_of_rootdbs script:

vi informix_onbar_backup_of_rootdbs
Configuring NetBackup for Informix 29
About NetBackup for Informix scripts

4 Modify the script according to the instructions in the file.


Customize the scripts to reflect your Informix installation. Refer to the comments
in the scripts that indicate "Replace ....". The scripts need to be modified to
have the correct Informix home path and Informix server name. The scripts
also must include the policy that you want to use to back up the files and the
name of the Informix configuration file.
For example, the informix_onbar_backup_of_rootdbs script contains the
following lines:

#!/bin/sh

# Replace xxxxx below with the extention used for your onconfig file.
ONCONFIG=onconfig.xxxxx

# Replace yyyyy below with the Informix home path.


INFORMIXDIR=/yyyyy/informix

# Replace zzzzz below with the name of the Informix server.


INFORMIXSERVER=zzzzz

# Replace informix_etc below with the name of the NetBackup server policy
# to be used to back up the $INFORMIXDIR/etc directory.
INFX_ETC_POLICY=informix_etc

echo "Started ‘date’"

export ONCONFIG
echo "exported ONCONFIG"

export INFORMIXDIR
echo "exported INFORMIXDIR"

export INFORMIXSERVER
echo "exported INFORMIXSERVER"

echo "INFXBSA_SERVER = $INFXBSA_SERVER"


echo "INFXBSA_SCHEDULED = $INFXBSA_SCHEDULED"
echo "INFXBSA_USER_INITIATED = $INFXBSA_USER_INITIATED"
echo "INFXBSA_FULL = $INFXBSA_FULL"
echo "INFXBSA_INCR = $INFXBSA_INCR"
echo "INFXBSA_POLICY = $INFXBSA_POLICY"
Configuring NetBackup for Informix 30
About NetBackup for Informix scripts

RETURN_STATUS=0

if [ "${INFXBSA_INCR}" = "1" ]
then
# NetBackup has started an incremental backup.
echo "$INFORMIXDIR/bin/onbar -b -L 1 rootdbs"
$INFORMIXDIR/bin/onbar -b -L 1 rootdbs
RETURN_STATUS=$?
else

echo "$INFORMIXDIR/bin/onbar -b -L 0 rootdbs"


$INFORMIXDIR/bin/onbar -b -L 0 rootdbs
RETURN_STATUS=$?

fi

if [ "$RETURN_STATUS" -eq "0" ]


then

# Initiate a backup of the directory that contains the onconfig,


# sqlhosts, oncfg_$INFORMIXSERVER.SERVERNUM, and ixbar.SERVERNUM
# files after doing the backup.

echo "bpbackup -p $INFX_ETC_POLICY -w 0 $INFORMIXDIR/etc"


/usr/openv/netbackup/bin/bpbackup -p $INFX_ETC_POLICY -w 0 $INFORMIXDIR/etc
BPBACKUP_STATUS=$?

if [ "$BPBACKUP_STATUS" -ne "0" ]


then
echo ""
echo "bpbackup of $INFORMIXDIR/etc returned $BPBACKUP_STATUS"
fi
fi

echo "Finished ‘date’"

echo "exit $RETURN_STATUS"


echo ""
Configuring NetBackup for Informix 31
About NetBackup for Informix scripts

exit $RETURN_STATUS

5 Test the scripts that you created.


More information is available on how to test your configuration.
See “Performing a manual backup” on page 36.

About NetBackup for Informix environment variables


When a schedule runs, NetBackup sets environment variables for the local shell
scripts to use when it performs the backup. The echo lines are used to show what
Informix environment variables are available.
You can use the Informix environment variables in the following lists to perform
conditional functions inside the scripts. These variables are local to the Informix
shell script.
NetBackup sets the following variables:

INFXBSA FULL Set to 1 if this backup is a full backup (Automatic


Full Backup).

INFXBSA_INCR Set to 1 if this backup is an incremental backup


(Automatic Incremental Backup).

INFXBSA_SCHEDULED Set to 1 if this backup is a scheduled backup


(Automatic Full Backup or Automatic Incremental
Backup).

INFXBSA_USER_INITIATED Set to 1 if this backup is a user-initiated backup


(Application Backup backup).

The Informix user can set the following variables either in the script or manually
from the command line in the same environment from which onbar is issued:

INFXBSA_SERVER Name of the NetBackup server.

INFXBSA_LOGICAL_POLICY Name of the policy to be used for a logical logs


backup. If this variable is set, NetBackup backs up
the logical logs with this policy.

INFXBSA_LOGICAL_SCHED Name of the schedule to be used for a logical logs


backup. If this variable is set, NetBackup
distinguishes and backs up logical logs with this
schedule.
Configuring NetBackup for Informix 32
Configuring an additional bp.conf file

INFXBSA_POLICY Name of the Informix-ON-Bar policy. If this variable


is set, NetBackup backs up Informix databases
with this policy.

INFXBSA_SCHED Name of the Application Backup schedule. If this


variable is set, NetBackup backs up Informix
databases with this schedule.

INFXBSA_KEYWORD The keyword phrase you want to associate with a


backup image.

Configuring an additional bp.conf file


The administrator can add options to the NetBackup bp.conf file on the NetBackup
master server. The administrator can create an additional bp.conf file in the home
directory of the Informix user’s account used for the backup or restore.
Before you use NetBackup for Informix, you can create a bp.conf file in the home
directory of the Informix user’s account used for the backup on the NetBackup
client. The path to this directory can be equal to the value of the $INFORMIXDIR
variable.
For example, if the home directory is /informix, the path is as follows:

/informix/bp.conf

After you create a bp.conf file in the Informix home directory, add the following
options to the file and replace the italicized text with the information that pertains
to the client:

BPBACKUP_POLICY=informix_policy
BPBACKUP_SCHED=informix_sched
SERVER=server_name
CLIENT_READ_TIMEOUT=1800

The variables are as follows:

informix policy The name of the Informix-ON-Bar policy that was configured in the
backup policy.

See “About configuring a backup policy for Informix ” on page 17.

informix_sched The schedule name for the informix_policy. By default, it is


Default-Application-Backup.

server_name The name of the NetBackup master server.


Configuring NetBackup for Informix 33
About permissions for NetBackup for Informix log files

NetBackup uses the bp.conf file in the Informix user’s home directory only for
backups and restores initiated by this Informix user.

About permissions for NetBackup for Informix


log files
NetBackup uses the /usr/openv/netbackup/logs directory tree not only for the
recording of troubleshooting information, but for progress and communication
updates to users and other NetBackup applications. Restrictive permissions on
these directories can not only disable the collection of troubleshooting data, but
also prevent the application itself from functioning correctly.
See “Enabling the debug logs manually” on page 53.

Reviewing the auto-discovered mappings in Host


Management
In certain scenarios, a NetBackup host shares a particular name with other hosts
or has a name that is associated with a cluster. To successfully perform backups
and restores with NetBackup for Informix, you must approve each valid
Auto-Discovered Mapping that NetBackup discovers in your environment. Or,
manually add the mappings.
See the section called “Approve the auto-discovered mappings for a cluster”
on page 34.
See the section called “Manually map host names” on page 35.
Examples of the configurations that have multiple host names include:
■ A host is associated with its fully qualified domain name (FQDN) and its short
name or its IP address.
■ If the Informix server is clustered, the host is associated with its node name and
the virtual name of the cluster.
These mappings appear in the Host Management properties on the master server.
You can also use the nbhostmgmt command to manage the mappings. See the
NetBackup Administrator's Guide, Volume I for more details on Host Management
properties.

Auto-discovered mappings for a cluster


In a Informix cluster environment, you must map the node names to the virtual
name of the cluster if the following apply:
Configuring NetBackup for Informix 34
Reviewing the auto-discovered mappings in Host Management

■ If the backup policy includes the cluster name (or virtual name)
■ If the NetBackup client is installed on more than one node in the cluster
If the NetBackup Client is only installed on one node, then no mapping is
necessary.

Approve the auto-discovered mappings for a cluster


To approve the auto-discovered mappings for a cluster
1 In the NetBackup Administration Console, expand Security Management >
Host Management.
2 At the bottom of the Hosts pane, click the Mappings for Approval tab.
The list displays the hosts in your environment and the mappings or additional
host names that NetBackup discovered for those hosts. A host has one entry
for each mapping or name that is associated with it.
For example, for a cluster with hosts client01.lab04.com and
client02.lab04.com, you may see the following entries:

Host Auto-discovered Mapping

client01.lab04.com client01

client01.lab04.com clustername

client01.lab04.com clustername.lab04.com

client02.lab04.com client02

client02.lab04.com clustername

client02.lab04.com clustername.lab04.com

3 If a mapping is valid, right-click on a host entry and click Approve.


For example, if the following mappings are valid for client01.lab04.com, then
you approve them.

Auto-discovered Mapping Valid name for

client01 The short name of the client

clustername The virtual name of the cluster

clustername.lab04.com The FQDN of the virtual name of the


cluster
Configuring NetBackup for Informix 35
Configuring the Maximum jobs per client

4 When you finish approving the valid mappings for the hosts, click on the Hosts
tab at the bottom of the Hosts pane.
For hosts client01.lab04.com and client02.lab04.com, you see Mapped
Host Names/IP Addresses that are similar to the following:

Host Mapped Host Names/IP Addresses

client01.lab04.com client01.lab04.com, client01, clustername,


clustername.lab04.com

client02.lab04.com client02.lab04.com, client02, clustername,


clustername.lab04.com

5 If you need to add a mapping that NetBackup did not automatically discover,
you can add it manually.

Table 3-7 Example mapped host names for a Informix cluster environment

Environment Host Mapped Host Names

Cluster with two nodes Physical name of Node 1 Virtual name of Informix server

Physical name of Node 2 Virtual name of Informix server

Manually map host names


If you need to add a mapping that NetBackup did not automatically discover, you
can add it manually.
To manually map host names
1 In the NetBackup Administration Console, expand Security Management >
Host Management.
2 Click on the Hosts tab.
3 Right-click in the Hosts pane and click Add Shared or Cluster Mappings.
For example, provide the name of the virtual name of the cluster. Then click
Select Hosts to choose the hosts to which you want to map that virtual name.

Configuring the Maximum jobs per client


The following procedure shows how to set the Maximum jobs per client attribute.
Configuring NetBackup for Informix 36
Performing a manual backup

To configure the maximum jobs per client


1 In the left pane of the NetBackup Administration Console, expand NetBackup
Management > Host Properties.
2 Select Master Server.
3 In the right pane, double-click the server icon.
4 Click Global Attributes.
5 Change the Maximum jobs per client value to 99.
The Maximum jobs per client specifies the maximum number of concurrent
backups that are allowed per client. The default is 1.
You can use the following formula to calculate a smaller value for the Maximum
jobs per client setting:
Maximum jobs per client = number_of_streams X number_of_policies
Refer to the following definitions:

number_of_streams The number of backup streams between the database server and
NetBackup. Each separate stream starts a new backup job on the client.

number_of_policies The number of policies of any type that can back up this client at the
same time. This number can be greater than one. For example, a client
can be in two policies to back up two different databases. These backup
windows can overlap.

Note: Enter a large enough value for the Maximum jobs per client attribute to
meet the number of jobs that Informix runs. You may need to experiment with
different values at your site.

See “Adding a NetBackup for Informix policy” on page 17.


See “About policy attributes” on page 18.

Performing a manual backup


After you configure the servers and clients in your environment, you can test the
configuration settings with a manual backup. Perform a manual backup (or backups)
with the automatic backup schedules you created.
To perform a manual backup
1 In the left pane, click Policies.
2 In the All Policies pane, select the policy you want to test.
Configuring NetBackup for Informix 37
Performing a manual backup

3 Select Actions > Manual Backup.


4 Select the schedule that you want to use for the manual backup.
5 Select the clients that you want to include for the manual backup.
Chapter 4
Performing backups and
restores of Informix
This chapter includes the following topics:

■ About using NetBackup for Informix

■ About Informix ON-Bar backup types

■ Example Informix backup strategy

■ Automatic backup policy for Informix

■ Manual backup policy for Informix

■ Using the onbar command to perform a user-directed backup

■ About browsing Informix backups

■ Restoring files to the original client

■ Redirecting an Informix restore to a different client

■ Example restore of an Informix database

About using NetBackup for Informix


When all installation and configuration are complete, you can start Informix backups
and restores through NetBackup or run the onbar command directly.
Always specify the correct ON-Bar script when configuring automatic backups or
when starting operations through NetBackup. NetBackup for Informix does not
generate an error if a restore ON-Bar script file is used for a backup operation or a
backup ON-Bar script is used for a restore operation.
Performing backups and restores of Informix 39
About Informix ON-Bar backup types

See “About Informix ON-Bar backup types” on page 39.


See “About the Informix ON-bar utility and library” on page 10.

About Informix ON-Bar backup types


The Informix ON-Bar utility supports different types of backups.
Table 4-1 describes each backup type.

Table 4-1 Informix ON-Bar backup types

Backup type Description

Level 0 backup (Full) An Informix level 0 backup is a full backup. It includes all the records
in the selected dbspaces and is the only type of backup that allows
a complete restore without performing any recovery steps.

Level 1 backup An Informix level 1 backup is an incremental backup. It backs up


(Incremental) the records that changed since the last level 0 backup in the
selected dbspaces.

Level 2 backup An Informix level 2 backup backs up the records that changed since
the last Level 1 Backup in the selected dbspaces. NetBackup does
not support this type of backup with an equivalent automatic
schedule. To perform level 2 backups write a script and by keep
track of the previous backup type with the ON-Bar script.

Logical-log backup An Informix logical-log backup backs up the filled logical logs. By
using the Informix ALARMPROGRAM configuration option, these
backups can be started on demand when the logical logs fill.

For more information, see your Informix documentation.

Example Informix backup strategy


The backup strategy in the following example is for a database that requires frequent
backups to provide protection against disk failure.
This strategy is as follows:
■ Perform an Informix full backup (level 0) every Friday night.
This backs up the selected dbspaces.
■ Perform an Informix incremental backup (level 1) each night.
■ Back up the $INFORMIXDIR/etc directory once a day.
Performing backups and restores of Informix 40
Automatic backup policy for Informix

The sample scripts that NetBackup for Informix installs by default include
parameters to back up the $INFORMIXDIR/etc directory after each full or each
incremental backup.
■ Configure the Informix ALARMPROGRAM to start a logical-log backup as the logs
fill.
If you do not want to wait for log files to fill, you can set up a separate NetBackup
policy and then schedule a full logical-log backup to occur as often as necessary.
Have a good strategy for backing up logical-log files because they are needed
for database recovery.

Automatic backup policy for Informix


The most convenient way to back up your database is to set up schedules for
automatic backups.
When the NetBackup scheduler invokes a schedule for an automatic backup, the
ON-Bar scripts run as follows:
■ In the same order as they appear in the file list
■ On all clients that have them (that is, matching path names)
The ON-Bar scripts start the database backup.
Instructions for how to add a new schedule or change an existing schedule for
automatic backups are available.

Manual backup policy for Informix


The administrator on the master server can use the NetBackup server software to
manually execute an Automatic Backup schedule for the Informix-ON-Bar policy.

Using the onbar command to perform a


user-directed backup
You can run the onbar command from the UNIX command line on the client to start
a backup.
See “About NetBackup for Informix scripts” on page 27.
Performing backups and restores of Informix 41
About browsing Informix backups

About browsing Informix backups


Use the bplist command to browse the Informix backup history on the master
server. The result is the list of dump file names. The following example assumes
that the root user issued the bplist(1M) command from the NetBackup master
server to search all Informix backups for a client named cabbage:

bplist -C cabbage -t 6 -R /legohead


/legohead/0/18
/legohead/0/17
/legohead/0/17
/legohead/rootdbs/0
/legohead/0/17
/legohead/0/17
/legohead/0/17
/legohead/0/16
/legohead/rootdbs/0

The -t 6 on this command specifies the Informix backups (dumps). Alternatively,


you can specify -t 0 to browse the backups of files in the $INFORMIXDIR/etc files.
For more information on this command, see the bplist(1M) man page.

Restoring files to the original client


To perform a user-directed restore, use the onbar command from the UNIX
command line on the client. For redirected restores, see the following topic:
See “Redirecting an Informix restore to a different client” on page 42.
To restore files to the original client
1 Log on to the NetBackup for Informix client.
You cannot run restore operations from the server.
2 Before you replace any disks that have failed, salvage the logical-log files.
Use the following command:

onbar -l -s

3 (Conditional) Determine whether you need to restore the $ONCONFIG file,


sqlhosts file, emergency boot file, or the oncfg_$INFORMIXSERVER.SERVERNUM
file.
If you need to restore these files, use the NetBackup Administration Console
, as follows:
Performing backups and restores of Informix 42
Redirecting an Informix restore to a different client

■ Change to the $INFORMIXDIR/etc directory.


Use the following command:

cd $INFORMIXDIR/etc

■ Start the Java interface:


Use the following command:

/usr/openv/netbackup/bin/jbpSA &

■ Select the files to restore and start the restore.

4 Use onbar to physically restore the damaged dbspaces.


For example:

onbar -r -p dbspace1 dbspace2

5 Use onbar to logically restore the dbspaces that you physically restored.
For example:

onbar -r -l

Redirecting an Informix restore to a different client


You have the option to restore an Informix database to a client other than the one
that originally supplied the backup. This process of restoring data to a different
client is called a redirected restore. You must be the NetBackup administrator to
perform these tasks.
To perform a redirected restore, the following conditions must be present:
■ The source and the destination clients must have identical operating system
versions and bit levels.
■ The source and the destination clients must have identical Informix database
versions.
■ The Informix ownerId, Informix groupId, and Informix home must be identical
on the source and on the destination clients.
For more information on redirected restores, see the NetBackup Administrator’s
Guide, Volume I.
If you use a non-root service user account, specific access must be allowed for that
user when you add files to the /usr/openv/netbackup/db/altnames directory.
The service user account must have full access to these files through the ownership
Performing backups and restores of Informix 43
Redirecting an Informix restore to a different client

or group and the permissions. For example, if the service user is svcname and its
group is srvgrp, the file can have permissions of 400. If the file owner is for a
different user and group, the file permissions must allow access to the service user.
For example, 777. Equivalent permission settings must be used in a Windows
environment.
To redirect an Informix restore to a different client
1 Create the following file on the master server:

/usr/openv/netbackup/db/altnames/client_name

For client_name, specify the name of the client that is allowed to perform the
redirected restore. Add the name of the NetBackup for Informix source client
to that file.
2 Back up the logical logs on the NetBackup for Informix source client.
A logical log contains records of all the database activity that occurs between
backups. These records contain all the database transactions that have taken
place after the last backup.
Log into the source client as Informix ownerId and issue the following command:

onbar -b -l

3 If the source client database server is down, salvage the logical logs.
This command backs up any logical logs that have not yet been backed up
and are not corrupted or destroyed.
Log into the source client as Informix ownerId and issue the following command:

onbar -l -s

4 Shut down the Informix database server on both the source client and the
destination client.
Issue one of the following commands:
■ For Informix Dynamic Server:

onmode -ky

■ For Extended Parallel Server:

xctl onmode -ky


Performing backups and restores of Informix 44
Redirecting an Informix restore to a different client

5 On the NetBackup for Informix destination client, back up the files that reside
in the $INFORMIXDIR/etc directory to preserve the original configuration. The
following steps overwrite files in this directory.
6 Copy configuration and informational files in the $INFORMIXDIR/etc directory
from the NetBackup for Informix source client to the $INFORMIXDIR/etc directory
on the NetBackup for Informix destination client.
You can use ftp(1) to copy files from the source client to the destination client.
■ Copy the emergency or the backup boot files.
For the Informix Dynamic Server, the emergency boot file is
$INFORMIXDIR/etc/ixbar.servernum.
For the Extended Parallel Server, the backup boot file is
$INFORMIXDIR/etc/Bixbar_hostname.servernum.
For servernum, specify the value of the SERVERNUM configuration parameter
that is specified in the $INFORMIXDIR/etc/$ONCONFIG file.
■ Copy the connectivity information file, $INFORMIXDIR/etc/sqlhosts, which
specifies how the client application finds and connects to an Informix
database server .
■ Copy the database configuration file that the environment variable ONCONFIG
specifies. This file is located in the $INFORMIXDIR/etc directory.
■ Copy the files that the Informix database server creates and updates every
time a dbspace, blobspace, logical-log file, or chunk is added or deleted.
For Informix Dynamic Server, this file is
$INFORMIXDIR/etc/oncfg_servername.servernum
For Extended Parallel Server and for each coserver this file is
$INFORMIXDIR/etc/oncfg_servername.servernum.coserverid
The variables are as follows:

servernum The value of the SERVERNUM configuration.

servername The value of the DBSERVERNAME configuration.

coserverid The ID of the coserver.

■ (Conditional) Copy file xcfg_servername.servernum.


Perform this step if you use the Extended Parallel Server. File
xcfg_servername.servernum contains information about coserver location
and dbslice definition.
In the file name, the variables are as follows:
Performing backups and restores of Informix 45
Example restore of an Informix database

servernum The value of the SERVERNUM configuration.

servername The value of the DBSERVERNAME configuration.

7 Configure the NetBackup for Informix destination client.


■ Set the INFXBSA_CLIENT environment variable to the host name of the
source client.
■ (Conditional) Set the INFXBSA_SERVER environment variable to the
NetBackup master server that is used for the source client backup.
Perform this step if the NetBackup master server that is used for the source
client backup is different than the server that is specified in the bp.conf file
on the destination.

8 Perform the redirected restore.


■ Log onto the NetBackup for Informix destination client as Informix ownerId.
■ Perform a physical restore.
Use the following command to restore storage spaces to their most recent
backed-up state:

onbar -r -p

■ Perform a logical restore.


Use the following command to update the most recent backed-up version
of the storage spaces with later transactions:

onbar -r -l

Example restore of an Informix database


This example shows the procedure for restoring an Informix database from the
original source computer, camel, to the destination computer, giraffe. For this
example, the redirected restore is necessary because the original computer, camel,
failed. You also can use a redirected restore to duplicate your Informix database
in a development or in a test environment.
This example assumes the following:
■ Source client camel is a Solaris computer that is running Informix.
■ SERVERNUM is 6

■ DBSERVERNAME is srcdb
Performing backups and restores of Informix 46
Example restore of an Informix database

■ Host name is camel

■ Destination client giraffe is a Solaris computer that is running Informix.


■ SERVERNUM is 0

■ DBSERVERNAME is destdb

■ Host name is giraffe

■ NetBackup master server is lion. The bp.conf on camel includes SERVER=lion.


If SERVER=lion were not the first server in the bp.conf file, then the environment
variable INFXBSA_SERVER on camel you would set to lion, as follows:

export INFXBSA_SERVER=lion

■ Previously you performed the onbar -b Informix database backup on camel.


■ Previously you performed a file system backup of $INFORMIXDIR/etc on camel,
which effectively backed up the following:
■ ixbar.6

■ sqlhosts

■ onconfig

■ oncfg_srcdb.6

■ You salvaged the logical logs on camel by using the following command:

onbar -l -s

To redirect an Informix restore (example)


1 As the NetBackup administrator, create the following file on the NetBackup
server, lion:

/usr/openv/netbackup/db/altnames/giraffe

2 Add the name camel to the file.


3 Log into giraffe as Informix ownerId and ensure that the Informix database
server is shut down.
4 Perform a manual file system backup of $INFORMIXDIR/etc on giraffe.
Including the following files:
■ ixbar.0

■ sqlhosts
Performing backups and restores of Informix 47
Example restore of an Informix database

■ onconfig

■ oncfg_destdb.0

Note that this step is a precautionary measure. It is performed in case these


configuration files are needed to recreate the environment on giraffe. This
backup is not used for the redirected restore.
5 On giraffe, change the Informix server environment variable to match the
variable on camel.
Use the following command:

export INFORMIXSERVER=srcdb

6 On giraffe, change the INFXBSA_CLIENT environment variable to camel.


For example:

export INFXBSA_CLIENT=camel

This causes giraffe to browse backups from camel.


7 (Conditional) On giraffe, set the INFXBSA_SERVER environment variable to
lion.

For example:

export INFXBSA_SERVER=lion

This step is needed only if the first server that is specified in the bp.conf file
on giraffe is not lion.
8 Browse the file system backups from camel and restore to $INFORMIXDIR/etc
on giraffe.
Restore the following files:
■ ixbar.6

■ sqlhosts

■ onconfig

■ oncfg_destdb.6

9 Perform the redirected restore to giraffe.


Complete the following steps:
■ To perform the physical restore, run the following command:

onbar -r -p
Performing backups and restores of Informix 48
Example restore of an Informix database

■ Verify the return status by using the following command:

echo $?

If the restore was successful, the return status is 0.


■ To perform the logical restore run the following command

onbar -r -l

■ Verify the return status by using the following command:

echo $?

If the restore was successful, the return status is 0.

10 On the destination client (giraffe), start the database.


Chapter 5
Troubleshooting
This chapter includes the following topics:

■ Verifying the NetBackup for Informix configuration

■ Verifying NetBackup for Informix log files

■ Enabling the debug logs manually

■ About the NetBackup for Informix log files

■ About NetBackup server reports

■ Setting the debug level

■ Minimizing timeout failures on large database restores

■ Minimizing the loading and unloading of tapes for database backups

■ Deleting expired backups from the Informix backup database

Verifying the NetBackup for Informix configuration


Use the following procedure to verify that environment variables, paths, and other
settings are correct for your installation.
To verify the configuration
1 Verify the existence of $BAR_BSALIB_PATH, which is defined in the Informix
$CONFIG file. This path should point to NetBackup's
/usr/openv/netbackup/bin/infxbsa.[so,sl,a] library. Ensure that the
permissions are set to 755.
2 Verify that the Informix policy and schedule are properly created.
See “About configuring a backup policy for Informix ” on page 17.
Troubleshooting 50
Verifying NetBackup for Informix log files

3 Set the following variables in the Informix $INFORMIXDIR/etc/$ONCONFIG


configuration file:
■ BAR_DEBUG. This variable sets the level of detail to be gathered about the
backup. The range is 0-9, with 9 providing the most detail. The Informix
instance uses the value that is specified in this variable, and it provides
debugging information according to the level specified.
■ BAR_DEBUG_LOG. This variable sets the location of the file to collect the log.
This should be the same location MSGPATH specifies in the Informix
configuration file, $ONCONFIG.
To set these variables, stop and restart the Informix instance, as follows:
■ For Informix version 9.x, run the following Informix commands:

onmode -uky
oninit

■ For Informix version 8.x, run the following commands:

xctl onmode -uky


xctl -C oninit

4 Make sure the table bar_version in the sysutils database has the correct
value for the bar_version column. The value should be 1.1.0.
5 (Optional) Verify that you are using the correct library.
Perform this step if you use NetBackup for Informix on an IBM AIX platform.

Verifying NetBackup for Informix log files


Use the following procedure to verify that the log files are configured correctly. You
can also refer to Informix ON-Bar utility error logging and tracing. See the section
called “About Informix ON-Bar utility logs” on page 53.
Troubleshooting 51
Verifying NetBackup for Informix log files

To verify the NetBackup for Informix log files


1 Check the Informix instance log specified by MSGPATH in the Informix
configuration file $ONCONFIG.
2 Verify the existence of the following log directories:

/usr/openv/netbackup/logs/user_ops/dbext/logs
/usr/openv/netbackup/logs/infxbsa

The user_ops and infxbsa directories and any subdirectories should have
777 permissions. They must exist and be accessible for the applications to
operate correctly.
3 Examine the client logs in the following order:
■ The Informix server log. This path is specified in ONCONFIG.
■ OnBAR debug log. This path is specified in ONCONFIG.

■ The NetBackup for Informix debug log directory,


/usr/openv/netbackup/logs/infxbsa.If this directory was created properly
and no log is present, then stop. The absence of a file in a properly created
directory indicates a problem with the communication from ON-Bar to
NetBackup for Informix. This file is the starting point of communication with
NetBackup. Its absence indicates there are no further NetBackup activities
on either the server or client.
Troubleshooting 52
Verifying NetBackup for Informix log files

4 Examine other log files.


The following log files reside in the /usr/openv/netbackup/logs directories
on the servers indicated:

Master server bpcd, bpdbm, bprd

Media server bpbrm, bpcd, bpdm, bptm

Client /user_ops/dbext/logs, bpcd, bphdb, infxbsa

NetBackup writes a log file to


/usr/openv/netbackup/logs/user_ops/dbext/logs for each backup and
restore session. NetBackup writes the other log files on a daily basis. Log files
in the log directories have the naming convention of log.mmddyy. or
mmddyy_nnnnn.log (if robust logging is enabled). These files may offer
additional debug information.
For example, the bprd log file shows if a backup or restore request from
bpbackup or bprestore was received. Examine the request’s details such as
client name, policy type, client type, and backup file name.
5 Examine the communication progress file.
The communication progress file logs communication between the NetBackup
server and the NetBackup client during backups and restores. This file is the
key file in the debugging process.
The following is an example of a progress file name:

/usr/openv/netbackup/logs/user_ops/dbext/logs/6749.0.1115233002

Perform the following steps to determine the communication progress file’s


name:
■ Use the cd(1) command to change to the
/usr/openv/netbackup/logs/infxbsa directory.

■ Use an editor to open the file in that directory.The following are examples
of file names: log.103105, 103105.00001.log.
■ Use an editor to open the log file and search for the communication progress
file’s name.
For example, search for the string openProgressFile.
The search flags the following lines in the file:

13:56:42.905 [6749] <4> openProgressFile: entering openProgressFile.


13:56:42.905 [6749] <4> openProgressFile: commFull = </usr/openv/
netbackup/logs/user_ops/dbext/logs/6749.0.1115233002>
Troubleshooting 53
Enabling the debug logs manually

This output tells you that the communication progress file’s name is
6749.0.1115233002.

About Informix ON-Bar utility logs


The Informix ON-Bar utility performs its own error logging and tracing in the file
specified by BAR_ACT_LOG in the $INFORMIXDIR/etc/ONCONFIG file. Database
administrators can use this log file to determine what happened during ON-Bar
execution.

Enabling the debug logs manually


To enable the debug logs manually
1 Create the following directories on the client:

/usr/openv/netbackup/logs/bpbackup
/usr/openv/netbackup/logs/bpbkar

/usr/openv/netbackup/logs/bphdb

/usr/openv/netbackup/logs/bprestore

/usr/openv/netbackup/logs/tar
/usr/openv/netbackup/logs/infxbsa

For example:

cd /usr/openv/netbackup/logs
mkdir bphdb

2 Verify that the user_ops directory, each of the log directories, and any
subdirectories exist and are accessible for all applications to operate correctly.
See “About permissions for NetBackup for Informix log files” on page 33.
3 Enable logging for the nbpem, nbjm, and nbrb scheduling processes that use
unified logging.
NetBackup writes unified logs to /usr/openv/logs.
You do not need to create log directories for the processes that use unified
logging.
Information on how to use logs and reports is available.
See the NetBackup Troubleshooting Guide.
Troubleshooting 54
About the NetBackup for Informix log files

About the NetBackup for Informix log files


The following topics describe the logs that are created when you create the log
directories. Use a text editor to view the contents of the logs.
See “ About the bphdb directory on the database client” on page 54.

About the bphdb directory on the database client


The /usr/openv/netbackup/logs/bphdb directory contains logs.
The following types of logs exist:
■ onbar_stdout.mmddyy

Unless it is redirected elsewhere, NetBackup writes ON-Bar script output to this


file.
■ onbar_stderr.mmddyy

Unless it is redirected elsewhere, NetBackup writes ON-Bar script errors to this


file.
■ log.mmddyy

This log contains debugging information for the bphdb process. bphdb is the
NetBackup database backup binary. It is invoked when an automatic backup
schedule is run. NetBackup for Informix uses this client process for ON-Bar
script execution.

About the infxbsa directory on the database client


The /usr/openv/netbackup/logs/infxbsa directory contains execution logs.
The following execution log exists:
■ log.mmddyy

This log contains debugging information and execution status for the NetBackup
for Informix client process.
See “Enabling the debug logs manually” on page 53.

About NetBackup server reports


NetBackup provides other reports that are useful in isolating problems. One such
report is All Logs Entries on the server. Information on server reports is available.
See the NetBackup Administrator’s Guide, Volume I.
Troubleshooting 55
Setting the debug level

Setting the debug level


To control the amount of information that is written to the debug logs, change the
“Database” debug level. Typically, the default value of 0 is sufficient. However,
Technical Support may ask you to set the value higher to analyze a problem.
The debug logs are located in /usr/openv/netbackup/logs.
To set the debug level on a UNIX client
◆ Enter the following line in the bp.conf file.

VERBOSE = X

Where X is the debug level you want.

Minimizing timeout failures on large database


restores
Large database restores sometimes fail when multiple restore sessions compete
for resources. In this situation, a restore session can be delayed while waiting for
media or device access. If the delay is too long, the restore session times out. Use
the following procedure to minimize session timeouts and to allow the restores to
complete successfully.
To minimize timeout failures on large database restores
1 In the NetBackup Administration Console, expand NetBackup Management
> Host Properties > Clients.
2 Double-click the client.
3 Select the Timeouts properties.
4 Set the Client read timeout property to a large value.
The default for the Client read timeout setting is 300 seconds (5 minutes).
For database agent clients, increase the value significantly from the
recommended value.
See the NetBackup Administrator’s Guide, Volume 1.
For example, change this setting to 30-60 minutes to minimize timeout errors.
5 Click OK for each client.
Troubleshooting 56
Minimizing the loading and unloading of tapes for database backups

Note: This change may delay detecting problems during subsequent backups.
Consider putting the original value back in place once any restore that requires a
change is complete.

Minimizing the loading and unloading of tapes for


database backups
You can minimize excessive unloading and reloading of tapes between
multistreamed database backups by changing the media settings for the master or
the media server.
See the NetBackup Administration Guide, Volume 1 for details.
To minimize loading and unloading of tapes
1 Open the NetBackup Administration Console.
2 Choose Host Properties.
3 Choose Master Servers or Media Servers.
4 Double-click on the name of the server.
5 In the left pane, click Media.
6 Configure the following settings:
■ Media unmount delay
■ Media request delay
Use this variable only with non-robotic drives, such as tape stackers.

Deleting expired backups from the Informix


backup database
The following topics describe how to delete expired backup images.

Informix versions XPS 8.x and IDS 9.x


onsmsync is an Informix version XPS 8.x, IDS 9.x utility that synchronizes the
NetBackup catalog with the Informix backup catalog. Use the onsmsync utility to
delete images from both Informix backup catalogs and NetBackup catalogs. For
information on the onsmsync utility, see your Informix documentation.
Troubleshooting 57
Deleting expired backups from the Informix backup database

Informix version IDS 7.x


Informix version IDS 7.x does not have a mechanism for deleting records of expired
backups from its backup database. NetBackup for Informix provides a script that
can delete these records from the Informix backup database if the NetBackup image
database has expired the backups. Run execute the following command as user
informix or the Informix Administrator.

/usr/openv/netbackup/ext/db_ext/informix/scripts/infx_remove_expired_images

When this script runs, it creates files in the /tmp directory. These files are not
removed. Later, they can be used to diagnose any problems that occur.
Appendix A
Register authorized
locations
This appendix includes the following topics:

■ Registering authorized locations used by a NetBackup database script-based


policy

Registering authorized locations used by a


NetBackup database script-based policy
During a backup, NetBackup checks for scripts in the default script location and
any authorized locations. The default, authorized script location for UNIX is
usr/openv/netbackup/ext/db_ext and for Windows is
install_path\netbackup\dbext. If the script is not in the default script location
or an authorized location, the policy job fails. You can move any script into the
default script location or any additional authorized location and NetBackup
recognizes the scripts. You need to update the policy with the script location if it
has changed. An authorized location can be a directory and NetBackup recognizes
any script within that directory. An authorized location can also be a full path to a
script if an entire directory does need to be authorized.
If the default script location does not work for your environment, use the following
procedure to enter one or more authorized locations for your scripts. Use
nbsetconfig to enter an authorized location where the scripts reside. You can also
use bpsetconfig, however this command is only available on the master or the
media server.
Register authorized locations 59
Registering authorized locations used by a NetBackup database script-based policy

Note: One recommendation is that scripts should not be world-writable. NetBackup


does not allow scripts to run from network or remote locations. All scripts must be
stored and run locally. Any script that is created and saved in the NetBackup db_ext
(UNIX) or dbext (Windows) location needs to be protected during a NetBackup
uninstall.
For more information about registering authorized locations and scripts, review the
knowledge base article:
https://www.veritas.com/content/support/en_US/article.100039639

To add an authorized location


1 Open a command prompt on the client.
2 Use nbsetconfig to enter values for an authorized location. The client privileged
user must run these commands.
The following examples are for paths you may configure for the Oracle agent.
Use the path that is appropriate for your agent.
■ On UNIX:

[root@client26 bin]# ./nbsetconfig


nbsetconfig>DB_SCRIPT_PATH = /Oracle/scripts
nbsetconfig>DB_SCRIPT_PATH = /db/Oracle/scripts/full_backup.sh
nbsetconfig>
<ctrl-D>

■ On Windows:

C:\Program Files\Veritas\NetBackup\bin>nbsetconfig
nbsetconfig> DB_SCRIPT_PATH=c:\db_scripts
nbsetconfig> DB_SCRIPT_PATH=e:\oracle\fullbackup\full_rman.sh
nbsetconfig>
<ctrl-Z>

Note: Review the NetBackup Command Reference Guide for options, such
as reading from a text file and remotely setting clients from a NetBackup server
using bpsetconfig. If you have a text file with the script location or authorized
locations listed, nbsetconfig or bpsetconfig can read from that text file. An
entry of DB_SCRIPT_PATH=none does not allow any script to execute on a client.
The none entry is useful if an administrator wants to completely lock down a
server from executing scripts.
Register authorized locations 60
Registering authorized locations used by a NetBackup database script-based policy

3 (Conditional) Perform these steps on any clustered database or agent node


that can perform the backup.
4 (Conditional) Update any policy if the script location was changed to the default
or authorized location.

You might also like