ADSM-L

Re: WAIT scripting command

1999-02-05 07:26:54
Subject: Re: WAIT scripting command
From: Leo Humar <lhumar AT VIC.BIGPOND.NET DOT AU>
Date: Fri, 5 Feb 1999 23:26:54 +1100
Hi Joel,
I 've been using modified sample scripts that are supplied with V3 for
windows NT.
This part may be of interest to you.

/* Backup a storage pool, then the database                             */

def script bkup_stg_db desc='Backup a storage pool, then the database'
upd script bkup_stg_db '/*  -----------------------------------------*/'
upd script bkup_stg_db '/*  Script Name:  BKUP_STG_DB                */'
upd script bkup_stg_db '/*  Description: Backup a storage pool, then */'
upd script bkup_stg_db '/*               the database.  If there are */'
upd script bkup_stg_db '/*               active node sessions,  do   */'
upd script bkup_stg_db '/*               run now, but reschedule to  */'
upd script bkup_stg_db '/*               check and run again in 20   */'
upd script bkup_stg_db '/*               minutes.                    */'
upd script bkup_stg_db '/*  Parameter 1: primary storage pool        */'
upd script bkup_stg_db '/*  Parameter 2: copy storage pool           */'
upd script bkup_stg_db '/*  Parameter 3: max process for stg backup  */'
upd script bkup_stg_db '/*  Parameter 4: devclass for db backup      */'
upd script bkup_stg_db '/*  Parameter 5: type and other db parms     */'
upd script bkup_stg_db '/*  Example1: run bkup_stg_db ST1 ST2 3 cart */'
upd script bkup_stg_db "/*              'type=full'                  */"
upd script bkup_stg_db '/*  Example2: run bkup_stg_db ST1 ST2 2 cart */'
upd script bkup_stg_db "/*      'type=incr vol=file:vols scratch=no' */"
upd script bkup_stg_db '/*  -----------------------------------------*/'
upd script bkup_stg_db ' select * from sessions where -'
upd script bkup_stg_db "   upper(session_type)='NODE'"
upd script bkup_stg_db ' if (rc_ok) goto reschedule'
upd script bkup_stg_db ' ba stg $1 $2 maxpr=$3 wait=yes'
upd script bkup_stg_db ' if (ok) goto db'
upd script bkup_stg_db ' q stg $1 f=d'
upd script bkup_stg_db ' db: ba db dev=$4 $5'
upd script bkup_stg_db ' exit'
upd script bkup_stg_db ' reschedule:'
upd script bkup_stg_db ' del sch retrybkup  type=a'
upd script bkup_stg_db ' def sch retrybkup t=a cmd="run bkup_stg_db  -'
upd script bkup_stg_db '     $1 $2 $3 $4  -'
upd script bkup_stg_db "    '$5'-"
upd script bkup_stg_db '     " active=yes startt=NOW+0:20 peru=o'

Leo Humar
<Prev in Thread] Current Thread [Next in Thread>