4 Operator

 • 

14.4K Posts

March 14th, 2006 23:00

What version of module is that? The error message returned is from OS. How does your backup script look like?

March 15th, 2006 02:00

The NML version is 2.2.1

The backup script is as follows:

# Here are my backup options:
myArgs="-P 2 -R"

# Set the following to your Lotus user if not already correct:
LOTUSUSER=notes

#get the OS type
os=`/bin/uname`

# For Linux
# Set the value for Notes_ExecDirectory variable to point to "libnotes.so"
# Set the value for LD_LIBRARY_PATH variable to point to "libnotes.so"
if [ "$os" = "Linux" ]; then
Notes_ExecDirectory=/opt/lotus/notes/latest/linux
LD_LIBRARY_PATH=/opt/lotus/notes/latest/linux
LOTUSARCH=linux
fi

#
PATH=/usr/sbin:/opt/lotus:/opt/lotus/bin:/opt/lotus/notes/latest/$LOTUSARCH:/opt/lotus/notes/latest/$LOTUSARCH/res/C:/bin:/usr/bin:/opt/networker/bin:/usr/bin/nsr
export PATH

PRECMD=

POSTCMD=

getdate="date '+%a %b %d %H:%M:%S %Y'"
Verbose=0 # Are we generating verbose output?
Pid=0 # Which process to kill when we are cancelled
nsrNote=""

run_precmd()
{
if [ "${PRECMD}" = "" ]; then
return 0
fi

vecho
vecho "Executing pre-processing command '${PRECMD}' at `eval $getdate`"
vecho

${PRECMD}
return_status=$?

vecho
vecho "Pre-processing command '${PRECMD}' finished at `eval $getdate`"
vecho

return $return_status
}

run_postcmd()
{
if [ "${POSTCMD}" = "" ]; then
return 0
fi

vecho
vecho "Executing post-processing command '${POSTCMD}' at `eval $getdate`"
vecho

${POSTCMD}
return_status=$?

vecho
vecho "Post-processing command '${POSTCMD}' finished at `eval $getdate`"
vecho

return $return_status
}

processargs()
{
while [ $# -gt 0 ]; do
case "$1" in
-s ) # Specify server
nsrNote="${nsrNote} $1 $2"
shift
shift
;;
-v ) # Verbose
Verbose=1
shift
;;
-N ) # Specify a new save set name
NSR_SAVESET_NAME="$2"
nsrNote="${nsrNote} $1 \"$2\""
shift
shift
;;
-b ) # Specify pool
nsrNote="${nsrNote} $1 \"$2\""
shift
shift
;;
-g ) # Specify group
nsrNote="${nsrNote} $1 \"$2\""
shift
shift
;;
-l ) # Specify level
nsrNote="${nsrNote} $1 $2"
shift
shift
;;
-LL ) # Specify schedule backup
nsrNote="${nsrNote} $1"
shift
;;
-w ) # Retention policy
nsrNote="${nsrNote} $1 $2"
shift
shift
;;
-y ) # Browse policy
nsrNote="${nsrNote} $1 $2"
shift
shift
;;
*) # Something we do not handle
shift
;;
esac
done
}

export_environment_variables()
{
export LIBPATH
export LD_LIBRARY_PATH
export Notes_ExecDirectory
export LOTUSUSER
}

print_environment_variables()
{
vecho "Printing out environemnt variable set:"
vecho "myArgs="$myArgs
vecho "LOTUSARCH="$LOTUSARCH
if [ "$os" = "AIX" ]; then
vecho "LIBPATH="$LIBPATH
else
vecho "LD_LIBRARY_PATH="$LD_LIBRARY_PATH
fi
vecho "Notes_ExecDirectory="$Notes_ExecDirectory
vecho "LOTUSUSER="$LOTUSUSER
vecho "PATH="$PATH
}

backup_notes()
{

#
# Pass NetWorker arguments to nsrnotesv.
#
if [ "$LOTUSUSER" != "" ]; then
su $LOTUSUSER -c "nsrnotesv $nsrNote $myArgs"
Pid=$!
wait $Pid

ret_status=$?
if [ $ret_status != 0 ]; then
echo "nsnotesv returned status of "$ret_status
echo $0 "exiting."
exit 1
fi
else
### Can not backup without LOTUSUSER being set.
echo "Unable to run nsrnotesv, LOTUSUSER variable not set in nsrnote.sh"
echo "LOTUSUSER variable must be set in order to run nsrnotesv and backup Lotus."
echo "Exiting without backing up Lotus."
exit 1
fi
}

#
# Echo the arguments only if in verbose mode.
#
vecho()
{
if [ $Verbose -gt 0 ]; then
echo "nsrnotesv: $@"
fi
}

handle_signal()
{
if [ $Pid != 0 ]; then
kill -2 $Pid
fi
exit 1
}

vecho "calling processargs"
processargs "$@"

export_environment_variables
print_environment_variables

trap handle_signal 2 15

run_precmd
precmd_status=$?
if [ $precmd_status != 0 ]; then
echo "Pre-processing command failed. Ending session."
exit 1
else
vecho "Pre-processing command succeeded."
fi

backup_notes

run_postcmd
postcmd_status=$?
if [ $postcmd_status != 0 ]; then
echo "Post-processing command failed. Ending session."
exit 1
else
vecho "Post-processing command succeeded."
fi

exit 0

4 Operator

 • 

14.4K Posts

March 15th, 2006 02:00

So, 'su $LOTUSUSER -c "nsrnotesv $nsrNote $myArgs"' is what it fails. What shell is set for that script? If it is not set it. Then as root with that shell try su notes -c ... Another thing to try is to put set -x in the script and capture the execution output to see where it fails exactly.
No Events found!

Top