ADSM-L

Re: Problem with macros

2002-03-12 15:15:31
Subject: Re: Problem with macros
From: Joe Cascanette <Joe.Cascanette AT CUMIS DOT COM>
Date: Tue, 12 Mar 2002 14:27:02 -0500
Yep, got it working. I created all the macros as scripts. And just defined a 
schedule type=admin CMD='run databasecheck', this works fine. 

I am still working on error checking and testing, but here are my simple 
scripts that provide a bit of automation. Since my backup size varies nightly, 
I needed to create a flow to have my offsite tapes and DB ready to go ASAP. The 
3 scripts (out of 4) listed below show a way to do this. I am working on the 
4th script to checkout the tapes to bulk (including the DB tape). 

===================================================================
#1 - dsk2tape.mac:
===================================================================
select PCT_UTILIZED from STGPOOLS where (stgpool_name='BACKUPPOOL' or 
stgpool_name='BACKUPPOOL_DRP') and PCT_UTILIZED>=10.0
if (rc_notfound) goto BACKUP_STG_POOL_TAPES
update stg BACKUPPOOL high=0 low=0
update stg BACKUPPOOL_DRP high=0 low=0
issue message i "Disk Pool is over 10% full. Disk to Tape is continuing. 
Schedule will recheck in 15 minutes"
goto RESCED
exit

BACKUP_STG_POOL_TAPES:
issue message i "Disk to Tape dump is complete. Lauching batch to copy ONSITE 
tapes to OFFSITE tapes.."
update stg backuppool high=80 low=60
update stg backuppool high=80 low=60
backup stg onsite offsite
backup stg onsite_drp offsite_drp 
update schedule automation type=administrative CMD="run backupcheck" 
startt=now+0:15
exit

RESCED:
update schedule automation type=administrative CMD="run dsk2tape" 
startt=now+0:15
exit

===================================================================
#2 - backupcheck.mac 
===================================================================
select process from processes where process='backup storage pool'
if (rc_notfound) goto database
goto resced
exit

database:
issue message i "Copying of ONSITE tapes to OFFSITE tapes is COMPLETE...will 
now start FULL Database backup"
BACKUP DB DEVC=DLT TYPE=FULL
update schedule automation type=administrative CMD="run databasecheck" 
startt=now+0:15
exit

RESCED:
issue message i "Copying of ONSITE tapes to OFFSITE tapes is not 
complete...will recheck in 15 minutes"
update schedule automation type=administrative CMD="run backupcheck" 
startt=now+0:15
exit

===================================================================
#3 - databasecheck.mac
===================================================================
select process from processes where process='Database Backup'
if (rc_notfound) goto checkout
goto resced
exit

checkout:
issue message i "Full Database backup is complete...Executing checkout of tapes 
and creation of DRP diskette"
backup devconfig
backup volhist
update schedule automation type=administrative CMD="run checkouttapes" 
startt=now+0:05
exit

RESCED:
issue message i "FULL Database backup is not complete...will recheck in 15 
minutes"
update schedule automation type=administrative CMD="run databasecheck" 
startt=now+0:15
exit
 
===================================================================
#4 checkouttapes.mac
===================================================================

Still under construction....
will need to figure out how to get the volume name and pass it to the next line 
for checkout.
At the end I will:
update schedule automation type=administrative CMD="run dsk2tape" 
startt=06:00:00
******************************************************************
Can I do something like this:
checkout libv mylib (select volume_name from drmedia where (voltype='dbbackup' 
and upd_date=current_date))
????????????????????

Joe Cascanette
The Cumis Group Limited


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