#!/bin/sh
#  $Id: sbc_restore_pre,v 1.1 2009/02/24 15:13:06 seniorix Exp $
#===============================================================================
#
#           SESAM RESTORE PRE procedure for UNIX clients
#
#===============================================================================
#
# Description: This script is called from SESAM before restore will begin.
#              It gives the user a possibility to do some special actions 
#              before beginning a restore operation
#              ( stop databases, send messages etc. ).
#
#              It is called with 10 parameters from the current SESAM backup:
#
#                $1 = Restore task
#                $2 = Overwrite or not (oy|n)
#                $3 = Media Label
#                $4 = Selectiv or full restore (s|f)
#                $5 = Tree Type (d|)
#                $6 = Restore target
#                $7 = Backup task name 
#                $8 = Sesam day
#                $9 = Saveset ID
#                10 = Tape server interface
#
#               Returning status:
#                if this procedure ran OK
#                then echo "STATUS:OK"
#                else echo "STATUS:ERROR text"
#
# >>> This is a user programmable procedure <<<
#
#

#=== Print call arguments =====================================
restore_task=$1
over=$2
label=$3 
restore_mode=$4
tree_type=$5
target=$6
task=$7
sesam_day=$8
saveset=$9
shift
tape_server=$9

echo Restore task     = $restore_task
echo Overwrite mode   = $over
echo Media label      = $label
echo Restore mode     = $restore_mode
echo Tree type        = $treetype
echo Restore target   = $target
echo Taskname         = $task
echo Sesam day        = $sesam_day
echo Saveset ID       = $saveset
echo Tape server      = $tape_server
echo

#=== Please insert your specific actions here =====================================


#echo STATUS:ERROR {message}
echo STATUS:OK
exit

