Unsolved

This post is more than 5 years old

4 Posts

572

April 7th, 2008 07:00

Using the save command with a customized backup script

Hi

I have a problem with our customized save scripts after upgrading both server and client to 7.3.4. It seems like i don't get any output into my savegroup completion report after my save is done. I get output regarding shutting down of databases and such but the post commands is all silent but they do execute. When troubleshooting this I use EMC's own example from the nwadmin guide...

Something has changed in EMCs way of handling output on stdout, stderr I believe.

EMCs example script looks like this (and i do not see anything from my simple "echo POSTCMD") :

#!/bin/sh
# export the SHELL that we are going to use
SHELL=/bin/sh
export SHELL
# export the correct PATH so that all the required binaries can be found
case $0 in
/* ) PATH=/usr/atria/bin:/bin:/usr/bin:`/usr/bin/dirname $0`
c=`/bin/basename $0`
;;
* )PATH=/usr/atria/bin:/bin:/usr/bin:/usr/sbin
c=$0
;;
esac
export PATH
# These are the valid statuses that save reports upon completion of the backup
statuses="
failed.
abandoned.
succeeded.
completed savetime=
"
# Perform the PRECMD
echo PRECMD
# Perform backup on client
save "$@" > /tmp/saveout$$ 2>&1
# cat out the save output
echo HOHO
cat /tmp/saveout$$
# search for backup status in output reported by save
for i in ${statuses}; do
result=`grep "${i}" /tmp/saveout$$`
if [ $? -ne 0 ]; then
echo ${result}
fi
done
# Perform the POSTCMD
echo POSTCMD
# exit gracefully out of the shell script
exit 0

4 Posts

April 7th, 2008 07:00

My savegroup completion email:

NetWorker savegroup: (notice) Test2 completed, Total 1 client(s), 1 Succeeded. Please see group completion details for more information.

Succeeded: fsu50

Start time: Mon Apr 7 15:35:53 2008
End time: Mon Apr 7 15:36:34 2008


--- Successful Save Sets ---

PRECMD
See the file /nsr/tmp/sg/Test2/sso.fsu50.000016 for details. This file may be removed after Mon Apr 14 15:35:53 2008.

2 Intern

 • 

14.3K Posts

April 7th, 2008 09:00

If this is simple pre/backup/post thing you could use savepnpc instead.

4 Posts

April 8th, 2008 00:00

Savepnpc is not an option. My script example here is from legatos own documentation just to keep it simple for troubleshooting.

2 Intern

 • 

14.3K Posts

April 8th, 2008 15:00

It might be as with Oracle module where you need to put special environment variable to have post part reported and handled by savegrp. The best thing is to contact support to verify if this is the case or not.
No Events found!

Top