@echo off REM ########################################################################### REM # REM # Licensed Material - Property Of IBM REM # REM # "Restricted Materials of IBM" REM # REM # IBM Informix Dynamic Server REM # REM # (c) Copyright IBM Corporation 1996, 2012 All rights reserved. REM # REM # Title: onbar REM # Description: Wrapper script for Informix Backup and Restore (ON-Bar). REM # Users may edit this script to customize backup and REM # restore operations, including specific Storage Manager REM # setup and cleanup procedures. REM # REM ########################################################################### set SAVEPATH=%PATH% if x%ISMDIR% NEQ x goto cont if exist %INFORMIXDIR%\bin\setism.bat call %INFORMIXDIR%\bin\setism.bat :cont if DEFINED ISMDIR set PATH=%ISMDIR%\bin;%PATH% if DEFINED INFORMIXDIR goto goodenv echo You need to set the variable INFORMIXDIR in your Windows environment goto end :goodenv REM ############################# REM # add startup processing here REM ############################# REM ######################## REM # end startup processing REM ######################## REM # Run the onbar driver %INFORMIXDIR%\bin\onbar_d %* set onbar_d_return=%errorlevel% REM ############################# REM # add cleanup processing here REM ############################# REM # Default cleanup processing for the ISM: REM # If we've just done a backup with the ISM, back up the ISM catalogs. REM # It's safe to check %1 because onbar commands must start with -[blr]. REM # We ignore ism_catalog errors because we're not sure that the ISM REM # is being used at this site or on a particular coserver. if "%1" == "-b" goto ism if "%1" == "-l" goto ism goto skip :ism if NOT "%onbar_d_return%" == "0" goto skip if NOT DEFINED ISMDIR goto skip if NOT exist %ISMDIR%\bin\ism_catalog.exe goto skip %ISMDIR%\bin\ism_catalog -create_bootstrap -pool ISMData >NUL 2>NUL :skip REM ######################## REM # end cleanup processing REM ######################## REM # return the error from onbar_d %INFORMIXDIR%\bin\set_error %onbar_d_return% :end set PATH=%SAVEPATH% %INFORMIXDIR%\bin\set_error %onbar_d_return%