ADSM-L

Re: Stgpool backup script

2004-02-13 08:51:41
Subject: Re: Stgpool backup script
From: David E Ehresman <deehre01 AT LOUISVILLE DOT EDU>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 13 Feb 2004 08:50:27 -0500
I use the following shell script function to wail until the number of
backup processes are down to a specified number:

#
# waitonbkp function - waits until fewer than $maxconcurrent
#                          bkps are running;
#                          checks after 15 seconds then every 5
minutes
function waitonbkp {
   waitime=15
   while (( $bkps >= $maxconcurrent ))
   do
     sleep $waitime
     waitime=300
     let bkps=$((`dsmadmc -id=$ID -pass=$PW q pro | grep "Backup
Storage Pool" |
 wc -l`))
     echo "     `date`, Number of storage pool backups running =
$bkps"
   done
}


>>> greg.redell AT GWL DOT COM 2/12/2004 10:37:15 AM >>>
Currently my backup script is sequential.  I have been wondering if
there is a way to use all my available drives but I don't want to go
the
way of using maxpr=2 because some of my backups are very large files
like 60+ GB in size, I could be doing other things while that goes on.

I would like to run two different backup stgpools and check every so
often, if there is only one process running start another backup
stgpool.
When all my storage ppols are backed up, kick off the dbbackup

I think I can handle most of the script through ifs and gotos but my
problem is determining how many processes are currently running.  The
SQL return codes don't seem to give me the results of a statement,
unless I am reading the return codes wrong.

So far what I have in mind (not exact syntax), and I have 4 drives so
I
want to run 2 concurrent backups

If [processes] = 2 goto reschedule
If [processes] = 1 goto startanotherbackup
If [processes] = 0 and allbackupscomplete goto dbbackup, volhist,
devconfig

I think that I would control what backups I have already done through
passing of script parameters.

Am I off my rocker, or is something like this possible?

Greg Redell
Great-West Life & Annuity Insurance Co.
Phone: 314-543-7009
Email: Gredell AT GWL DOT com

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