Further Information
Examples of Pre-Exec and Post-Exec Commands for UNIX
Appendix A A-23
Session
Post-Exec: Notify
User
#!/bin/sh
/opt/omni/bin/omnirpt -report single_session -session
$SESSIONID | \
mailx -s "Report for $SESSIONID" $OWNER
Session
Post-Exec: Start
Another Backup
#!/bin/sh
# First check how the current backup finished
if [ $SMEXIT != 0 -o $SMEXIT != 10 ]
then
echo "Backup not successful --> next backup will not be
started!"
exit 0
fi
if [ $RESTARTED != 0 ]
then
echo "Restarted backup --> next backup will not be
started!"
exit 0
fi
/opt/omni/bin/omnib -datalist BACKUP_NO_2 -no_mon
exit 0
Session
Post-Exec: Restart
Failed Backup
#!/bin/sh
# First check how the current backup finished
if [ $SMEXIT != 0 -o $SMEXIT != 10 ]
then
echo "Backup not successful --> backup will not be
restarted!"
exit 0
fi
if [ $RESTARTED != 0 ]