Unsolved
This post is more than 5 years old
4 Posts
0
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
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
No Events found!



fbackman
4 Posts
0
April 7th, 2008 07:00
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.
ble1
2 Intern
•
14.3K Posts
0
April 7th, 2008 09:00
fbackman
4 Posts
0
April 8th, 2008 00:00
ble1
2 Intern
•
14.3K Posts
0
April 8th, 2008 15:00