Re: Stgpool backup script

2004-02-16 Thread asr
=> In article <[EMAIL PROTECTED]>, David E Ehresman <[EMAIL PROTECTED]> writes:


>> Why not just kick off all the work you need to do?

> Because I have an obligation to keep at least one tape drive free for
> restores and/or ad hoc backups.

I'm jealous; I haven't had enough tapes to do this for a long time.

> And also so I know when a set of processes have ended so that I can start
> the next job in the daily processes stream, i.e. backup stg disks, backup
> stg tapes, backup db, dr plan, eject tapes for offsite, migration,
> expiration, followed by reclaims and move data.

.. Well, if you don't need to keep a drive free, then these problems are
solved the same way: Stack up the processes.

We meet the restore need by watching the sessions periodically with human eyes
instead of scripts: If a restore gears up then we clear a drive.

The backups aren't an issue: we write data to disk first, so adhoc backups
just accumulate until the next morning's maintainance stuff.


- Allen S. Rout


Re: Stgpool backup script

2004-02-13 Thread David E Ehresman
>Why not just kick off all the work you need to do?

Because I have an obligation to keep at least one tape drive free for
restores and/or ad hoc backups.

And also so I know when a set of processes have ended so that I can
start the next job in the daily processes stream, i.e. backup stg disks,
backup stg tapes, backup db, dr plan, eject tapes for offsite,
migration, expiration, followed by reclaims and move data.


Re: Stgpool backup script

2004-02-13 Thread David E Ehresman
>Why not just kick off all the work you need to do?

Because I have an obligation to keep at least one tape drive free for
restores and/or ad hoc backups.


Re: Stgpool backup script

2004-02-13 Thread asr
=> In article <[EMAIL PROTECTED]>, David E Ehresman <[EMAIL PROTECTED]> writes:

>>>> [EMAIL PROTECTED] 2/12/2004 10:37:15 AM >>>

>> 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 use the following shell script function to wail until the number of
> backup processes are down to a specified number:


Why not just kick off all the work you need to do?

The processes that can't grab a mount point will happily wait around.

I've got probably 40 DISK stgpools that I backup and migrate every day.  My
TSM script that kicks them off is included below: when it starts, it initiates
a bunch of backup processes, some of which fail immediately (no data in disk
pool) some of which check and find all up to date, some of which do work.

This method saves you logic and actlog lines of your script constantly
polling, and it further uses the tape drives during the lag between when a
process completes, and when your script next polls.

- Allen S. Rout





/* stgpool backup script */
/* for device class 'DISK' */
/*
/*
/* This script generated by /u/adsm/bin/gen-backup-script
/* at 2004-02-13 05:05:04
/* on spnode05
/*
/* */
backup stgpool sm-disk sm-c1 maxproc=1
backup stgpool uaa-disk uaa-c1 maxproc=1
backup stgpool counsel-disk counsel-c1 maxproc=1
backup stgpool mse-disk mse-c1 maxproc=1
backup stgpool mbi-disk mbi-c1 maxproc=1
backup stgpool path-disk path-c1 maxproc=1
backup stgpool erp-disk erp-c1 maxproc=1
backup stgpool erp-disk erp-itc maxproc=2
backup stgpool runs-disk runs-c1 maxproc=1
backup stgpool doce-disk doce-c1 maxproc=1
backup stgpool nersp-disk nersp-c1 maxproc=1
backup stgpool glmail-disk nersp-c1 maxproc=1
backup stgpool nersp-disk nersp-itc maxproc=2
backup stgpool edify-disk edify-c1 maxproc=1
backup stgpool edify-disk edify-itc maxproc=1
backup stgpool admin-disk admin-c1 maxproc=1
backup stgpool atcs-disk atcs-c1 maxproc=1
backup stgpool atcs-disk atcs-itc maxproc=1
backup stgpool hp-disk hp-c1 maxproc=1
backup stgpool afn-disk afn-c1 maxproc=1
backup stgpool deleted-users-disk deleted-users-C1 maxproc=1
backup stgpool novell-disk novell-c1 maxproc=1
backup stgpool novell-disk novell-itc maxproc=1
backup stgpool registrar-disk registrar-c1 maxproc=1
backup stgpool thecenter-disk thecenter-c1 maxproc=1
backup stgpool thecenter-disk thecenter-itc maxproc=1
backup stgpool uff-disk uff-c1 maxproc=1
backup stgpool workstations-disk workstations-c1 maxproc=1
backup stgpool workstations-disk workstations-itc maxproc=1
backup stgpool vi-disk vi-itc maxproc=1
backup stgpool vi-disk vi-c1 maxproc=1
backup stgpool zoo-disk zoo-c1 maxproc=1
backup stgpool zoo-disk zoo-itc maxproc=1
backup stgpool lawnet-disk lawnet-c1 maxproc=1
/* EOF */


Re: Stgpool backup script

2004-02-13 Thread David E Ehresman
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
}


>>> [EMAIL PROTECTED] 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: [EMAIL PROTECTED]


Re: Stgpool backup script

2004-02-12 Thread Redell, Greg S.
I thought about going down that path, but I wanted to see if it could be
done inside the TSM server's command script.

-Original Message-
From: Thomas Denier [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 12, 2004 2:15 PM
To: [EMAIL PROTECTED]; Redell, Greg S.
Subject: Re: Stgpool backup script

> 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?

Offhand, I can only think of one way to do what you have in mind
with TSM server scripts: start all the backups, let them queue up
waiting for tape drives, and poll periodically to see if any
backups are still running. A script could check that by running
a 'select' command to select storage pool backups from the processes
table. A select that does not find any matching table entries will
end with a return code of 11.

That being said, I would be inclined to use scripting facilities
outside of TSM to manage multiple streams of storage pool backups.
I currently do this sort of thing for an OS/390 server using the
Rexx language and the Unix-like facilities provided by the USS
component of OS/390. If our server ran under Unix I could have
done the same thing using Perl. My script starts two background
processes and then goes into a loop in which each iteration waits
for a background process to end and starts another process.


Re: Stgpool backup script

2004-02-12 Thread Thomas Denier
> 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?

Offhand, I can only think of one way to do what you have in mind
with TSM server scripts: start all the backups, let them queue up
waiting for tape drives, and poll periodically to see if any
backups are still running. A script could check that by running
a 'select' command to select storage pool backups from the processes
table. A select that does not find any matching table entries will
end with a return code of 11.

That being said, I would be inclined to use scripting facilities
outside of TSM to manage multiple streams of storage pool backups.
I currently do this sort of thing for an OS/390 server using the
Rexx language and the Unix-like facilities provided by the USS
component of OS/390. If our server ran under Unix I could have
done the same thing using Perl. My script starts two background
processes and then goes into a loop in which each iteration waits
for a background process to end and starts another process.


Stgpool backup script

2004-02-12 Thread Redell, Greg S.
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: [EMAIL PROTECTED]