nsrnmo(8)

NAME
nsrnmo - NetWorker Module for Oracle scheduled backup command script

SYNOPSIS
nsrnmo <save options>

DESCRIPTION

The nsrnmo shell script is used by the NetWorker server program savegrp(8) to trigger scheduled backups on an Oracle8 or Oracle8i database server. The nsrnmo script sets specific environment variables for the scheduled Oracle backup and invokes the Oracle Recovery Manager (RMAN), the backup interface provided by Oracle8 and Oracle8i.

The nsrnmo script is usually run by savegrp only. It is not run manually. To use the nsrnmo script for a scheduled Oracle backup, you must specify nsrnmo in the Backup command attribute of the client resource (see nsr_client(5)) for the scheduled Oracle backup.

To modify the nsrnmo command script, you should copy the template file /etc/nsrnmo.sh to the nsrnmo file and modify the nsrnmo file. Do not modify the template file /etc/nsrnmo.sh. Keep the template file unchanged, as a reference to the original nsrnmo script.

For information on how to create a separate nsrnmo script file for each Oracle instance, refer to Chapter 5 on scheduled Oracle backups in the latest NetWorker Module for Oracle Administrator's Guide.

There are seven environment variables in the nsrnmo script that you must customize for a particular scheduled Oracle backup. The variables ORACLE_HOME and PATH are mandatory for each scheduled Oracle backup. The other variables are optional, and you can leave them undefined in the script, if desired. Note that the variables in the nsrnmo file are all initially undefined.

In addition, if you wish the Oracle environment variable TNS_ADMIN to be in effect during a scheduled Oracle backup, you must add lines to define and export the TSN_ADMIN variable in the nsrnmo script. Variable: ORACLE_HOME
Default value: Undefined
Description: This environment variable is mandatory for each scheduled Oracle backup. Set the ORACLE_HOME environment variable to the home directory of the Oracle Server installation. Note that the RMAN executable, rman, must be located in the subdirectory bin of $ORACLE_HOME.

For example, if the Oracle Server installation is located in the directory /disk3/oracle/app/oracle/product/8.1.5, you must set ORACLE_HOME in the nsrnmo script as follows:
ORACLE_HOME=/disk3/oracle/app/oracle/product/8.1.5 Variable: PATH
Default value: Undefined
Description: This environment variable is mandatory for each scheduled Oracle backup. Set the PATH environment variable to include the directory containing the NetWorker Module for Oracle program nsrnmostart. This directory also contains the NetWorker executables and the nsrnmo script file itself.

For example, if the program nsrnmostart is located in the directory /usr/bin on a Solaris Oracle Server host, you must set PATH in the nsrnmo script to the following type of value:
PATH=/usr/bin Variable: LD_LIBRARY_PATH
Default value: Undefined
Description: This environment variable is only mandatory for scheduled Oracle backups on SGI. Set LD_LIBRARY_PATH to the directory containing the Oracle libraries, typically $ORACLE_HOME/lib.

For example, if the Oracle libraries are located in the directory /disk3/oracle/app/oracle/product/8.0.4/lib on your SGI system, you must set LD_LIBRARY_PATH in the nsrnmo script as follows:
LD_LIBRARY_PATH=/disk3/oracle/app/oracle/product/8.0.4/lib

Be sure to uncomment the line "export LD_LIBRARY_PATH" (by removing the # symbol from the start of the line) under the function heading "export_environment_variables()" in the nsrnmo script:
export_environment_variables()
{
export ORACLE_HOME
export NSR_RMAN_ARGUMENTS
:
export LD_LIBRARY_PATH
} Variable: NSR_RMAN_ARGUMENTS
Default value: Undefined
Description: This environment variable is optional for a scheduled Oracle backup. If desired, you can set NSR_RMAN_ARGUMENTS to a double-quoted string containing any valid combination of parameters for the RMAN executable, rman.

For example, if you are using a Recovery Catalog for the scheduled backup and you wish to append RMAN output to the message log file /nsr/applogs/msglog.log, you can set NSR_RMAN_ARGUMENTS in the nsrnmo script as follows:
NSR_RMAN_ARGUMENTS=msglog'/nsr/applogs/msglog.log'append Variable: NSR_SB_DEBUG_FILE
Default value: Undefined
Description: This environment variable is optional for a scheduled Oracle backup. You can set NSR_SB_DEBUG_FILE to the name of the file to receive detailed debugging information specifically for the scheduled backup. Note that this file will exclude RMAN-specific debugging information, which is directed to NSR_DEBUG_FILE (if set in the RMAN script).

For example, to send detailed debugging information for the scheduled backup to the file /nsr/applogs/nsrnmo.log, you can set NSR_SB_DEBUG_FILE in the nsrnmo script as follows:
NSR_SB_DEBUG_FILE=/nsr/applogs/nsrnmo.log Variable: PRECMD
Default value: Undefined
Description: This environment variable is optional for a scheduled Oracle backup. You can set PRECMD to run a user-specified preprocessing script before launching the scheduled Oracle backup. If this script does not run successfully (that is, it returns a nonzero value), nsrnmo will exit without performing the scheduled Oracle backup.

Note that the preprocessing script must return a zero value when it succeeds and a nonzero value when it fails. It is the responsibility of the script writer to ensure that the preprocessing script returns the proper value. For more details and an example of a preprocessing script, refer to Chapter 5 on scheduled Oracle backups in the latest NetWorker Module for Oracle Administrator's Guide.
Variable: POSTCMD
Default value: Undefined
Description: This environment variable is optional for a scheduled Oracle backup. You can set POSTCMD to run a user-specified post-processing script after the scheduled Oracle backup is complete. This script is run whether or not the database backup fails.

Note that the post-processing script must return a zero value when it succeeds and a nonzero value when it fails. It is the responsibility of the script writer to ensure that the post-processing script returns the proper value. For more details and an example of a post-processing script, refer to Chapter 5 on scheduled Oracle backups in the latest NetWorker Module for Oracle Administrator's Guide. Variable: TNS_ADMIN
Default value: Undefined
Description: This environment variable must be added to the nsrnmo script if you wish it to be in effect during a scheduled Oracle backup.

If the Oracle Net8 configuration files are located in a directory other than the default directory $ORACLE_HOME/network/admin, you must add the definition of TNS_ADMIN to the nsrnmo script.

In this case, add a line to the nsrnmo script to set the value of TNS_ADMIN to the pathname of the directory containing the Oracle Net8 configuration files. Be sure to add this line above the function heading "export_environment_variables()" as shown below. Also, be sure to add another line below the function heading "export_environment_variables()", to export the TNS_ADMIN variable as shown below.

For example, if the Oracle Net8 configuration files are located in the directory /disk3/oracle/app/oracle/product/8.0.4/network/admin1, you must add the lines to define and export TNS_ADMIN in the nsrnmo script as follows:
TNS_ADMIN=/disk3/oracle/app/oracle/product/8.0.4/network/admin1
export_environment_variables()
{
export ORACLE_HOME
export NSR_RMAN_ARGUMENTS
:
export TNS_ADMIN
}

OPTIONS
Please see the save(8) man page for a description of options supported by nsrnmo.

FILES

/etc/nsrnmo.sh
    A template of this command is provided in /etc.

SEE ALSO
mminfo(8), nsr_client(5), nsr_pool(5), nwadmin(8), save(8), savegrp(8).