Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   Overview of the ON-Bar Backup and Restore System > Using ON-Bar Utilities > Customizing ON-Bar and Storage-Manager Commands >

Printing the Backup Boot Files

Use the following examples of what to add to the onbar script to print the emergency boot file if the backup is successful. Each time that you issue the onbar -b command, the emergency boot file is printed.

UNIX Only
onbar_d "$@"    # receives onbar arguments from command line
return_code = $?   # check return code

# if backup (onbar -b) is successful, prints emergency boot file
if [$return_code -eq 0 -a "$1" = "-b"]; then
   servernum='awk '/^SERVERNUM/ {print $2}' $INFORMIXDIR/etc/$ONCONFIG '
   lpr \$INFORMIXDIR/etc/ixbar.$servernum
fi
exit $return_code
End of UNIX Only
Extended Parallel Server

To print the backup boot files on all coservers, replace the line:

lpr \$INFORMIXDIR/etc/ixbar.$servernum

with:

xctl lpr \$INFORMIXDIR/etc/Bixbar_\'hostname\'.$servernum 

If more coservers than hosts are on the system, this script prints the same boot files twice.

End of Extended Parallel Server
Windows Only
@echo off
%INFORMIXDIR%\bin\onbar_d %*
set onbar_d_return=%errorlevel%

if "%onbar_d_return%" == "0" goto backupcom
goto skip

REM Check if this is a backup command

:backupcom
if "%1" == "-b" goto printboot
goto skip

REM Print the onbar boot file

:printboot
print %INFORMIXDIR%\etc\ixbar.???

REM Set the return code from onbar_d (this must be on the last line of 
the script)

:skip
%INFORMIXDIR%\bin\set_error %onbar_d_return%
:end
End of Windows Only
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]