Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script NRS*** for legato solaris & rman

Status
Not open for further replies.

mazingaZ

Technical User
Joined
Feb 1, 2005
Messages
1
Location
IT
I have edited the file NSRNMO (1 copy) following the instructions; every attempt turns out in the following error:
feb 01 18:18:42 fp: * 10.124.0.101:/usr/sbin/rman.test 1 retry attempted feb 01 18:18:42 fp: *

10.124.0.101:/usr/sbin/rman.test /usr/sbin/nsrnmoprova: -s: not found

Use Legacy 7,1 server (windows) and legacy 7,1 (client Solaris 9) with module 4,1 for oracle. This is the script NRSNMOTEST that I am using:

#!/bin/sh
#
# $Id: nsrnmo.template,v 1.3.52.4 2003/06/25 21:42:19 yozekinc Exp $ Copyright (c) 2003, Legato Systems, Inc.
#
# All rights reserved.
#
# nsrnmo.sh
#
# Legato Networker Module for Oracle 4.1
#
# This script is part of the Legato NetWorker Module for Oracle.
# Modification of this script should be done with care and only after reading
# the administration manual included with this product.
#
# This script should only be run as part of a scheduled savegroup.
#
# Returns 0 on success; 1 on failure.
#

#
# REQUIRED Variable: ORACLE_HOME
#
# Default value: NONE (site specific)
#
# Description: Specifies where the Oracle Server installation is located.
# It is a requirement that rman be located in ORACLE_HOME/bin.
#
# Samples:
# ORACLE_HOME=/disk3/oracle/app/oracle/product/8.1.6
#
ORACLE_HOME=/opt/oracle/app/9.2.0


# REQUIRED Variable: PATH
#
# Default value: NONE (site and platform specific)
#
# Description: Set up the PATH environment variable.
# This must be configured to include the path to "nsrnmostart"
#
# Samples:
# PATH=/bin:/usr/sbin:/usr/bin:/nsr/bin
#
PATH=$PATH:/usr/sbin:/usr/bin:/etc:.:/opt/oracle/app/9.2.0/bin

#
# Optional Variable: ORACLE_SID
#
# Default value: NONE (site specific)
#
# Description: Specifies the SID of the Oracle database being backed up.
# It is required by proxy copy backups when catalog synchronization is
# enabled.
#
# Samples:
# ORACLE_SID=orcl815
#
ORACLE_SID=folium

#
# Optional Variable: NSR_RMAN_ARGUMENTS
#
# Default value: NONE (site specific)
#
# Description: Provide extra rman parameters.
# You must enclose the command in quotes or it will not be
# passed correctly to rman.
#
# Samples:
# NSR_RMAN_ARGUMENTS="nocatalog msglog '/nsr/applogs/msglog.log' append"
#
# NSR_RMAN_ARGUMENTS="nocatalog"
#
NSR_RMAN_ARGUMENTS="nocatalog"

#
# Optional Variable: NSR_RMAN_OUTPUT
#
# Default value: NONE (site specific)
#
# Description: Provide option to capture the RMAN standard output
# if RMAN "msglog" or "log" command line option is not set.
# The connect strings will be hidden in this file.
#
# Samples:
# NSR_RMAN_OUTPUT="/nsr/applogs/msglog.log append"
#
# NSR_RMAN_OUTPUT="/nsr/applogs/msglog.log"
#
NSR_RMAN_OUTPUT="/nsr/applogs/msglog.log

#
# Optional Variable: NSR_SB_DEBUG_FILE
#
# Default value: NONE (site specific)
#
# Description: To enable debugging output for NMO scheduled backups set
# the following to an appropriate path and file name.
# Set this variable for debugging purposes only
#
# Samples:
# NSR_SB_DEBUG_FILE=/nsr/applogs/nsrnmostart.log
#
NSR_SB_DEBUG_FILE=/nsr/applogs/nsrnmostart.log

#
# Optional Variable: PRECMD
#
# Default value: NONE
#
# Description: This variable can be used to run a command or command script
# before nsrnmostart. It will be launched once for every saveset
# entered in the client setup.
#
PRECMD=

#
# Optional Variable: POSTCMD
#
# Default value: NONE
#
# Description: This variable can be used to run a command or command script
# after nsrnmostart has completed. It will be launched once for
# every saveset entered in the client setup.
#
POSTCMD=

#
# Optional Variable: LD_LIBRARY_PATH
#
# Default value: NONE
#
# Description: This variable may have to be set on some Unix operating systems.
# We suggest leaving it unset unless you have a scheduled backup problem.
# If it is set you must also uncomment the export LD_LIBRARY_PATH
# in the function export_environment_variables below.
#
# Samples:
# LD_LIBRARY_PATH=/disk3/oracle/app/oracle/product/8.1.6/lib
#
LD_LIBRARY_PATH=/opt/oracle/app/9.2.0/lib32:/opt/oracle/app/9.2.0/lib:/opt/oracle/app/9.2.0/ctx/lib:/usr/openwin/lib

#
# Optional Variable: TNS_ADMIN
#
# Default value: NONE
#
# Description: This variable needs to be set if Oracle Net configuration
# files are not located in default locations.If it is set you must also uncomment
# the export TNS_ADMIN in the function export_environment_variables below.
#
# Samples:
TNS_ADMIN=/opt/oracle/app/product/9.2.0/network/admin
#

export_environment_variables()
{

export ORACLE_HOME
export ORACLE_SID
export NSR_RMAN_ARGUMENTS
export NSR_RMAN_OUTPUT
export PRECMD
export POSTCMD
export PATH
export NSR_SB_DEBUG_FILE
export LD_LIBRARY_PATH
export TNS_ADMIN

}


###########################################################################
# Do not edit anything below this line.
###########################################################################


Pid=0 # process to kill if we are cancelled
nsrnmostart_status=0 # did it work?


#
# Handle cancel signals sent by savegrp when user stops the group.
#
handle_signal()
{
if [ $Pid != 0 ]; then
kill -2 $Pid
fi
exit 1
}

#
# The main portion of this shell.
#

#
# Make sure we respond to savegrp cancellations.
#
trap handle_signal 2 15

#
# Build the nsrnmostart command
#

opts=""
while [ $# -gt 0 ]; do
case "$1" in
-s ) # server name
opts="$opts $1 '$2'"
shift 2
;;
-N ) # save set name
opts="$opts $1 '$2'"
shift 2
;;
-e ) # expiration time
opts="$opts $1 '$2'"
shift 2
;;
-b ) # Specify pool
opts="$opts $1 '$2'"
shift 2
;;
-c ) # Specify the client name
opts="$opts $1 '$2'"
shift 2
;;
-g ) # Specify group
opts="$opts $1 '$2'"
shift 2
;;
-m ) # Specify masquerade
opts="$opts $1 '$2'"
shift 2
;;
-A ) # Specify PowerSnap options
opts="$opts $1 '$2'"
shift 2
;;
*) # rest of options
opts="$opts $1"
shift
;;
esac
done

if [ "${BACKUP_OPT}" != "" ];
then
BACKUP_COMMAND_LINE="nsrnmostart ""$BACKUP_OPT"" $opts"
else
BACKUP_COMMAND_LINE="nsrnmostart $opts"
fi

#
# Export all necessary environment variables
#
export_environment_variables

#
# Call nsrnmostart to do the backups.
#

#print $BACKUP_COMMAND_LINE
eval ${BACKUP_COMMAND_LINE} &
Pid=$!
wait $Pid

nsrnmostart_status=$?
if [ $nsrnmostart_status != 0 ] ; then
echo "nsrnmostart returned status of "$nsrnmostart_status
echo $0 "exiting."
exit 1
fi

exit 0

thanks in advance payment
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top