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


-----Original Message-----
From: Andrew Raibeck [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 12, 2002 1:45 PM
To: [EMAIL PROTECTED]
Subject: Re: Problem with macros


By "fully-qualify", I mean to spell out the full path to the macro. That
is, don't just use

   database

as there is no implicit extension that I am aware of. You need to specify
the .mac extension as well as the path to the file. For example:

   C:\TSM\server1\database.mac

or

   C:\Program Files\Tivoli\TSM\server1\database.mac

Another "fly in the ointment": you can not schedule the MACRO command (I
had forgotten this, but just verified that it still holds true).

Here is what I think would work for you:

Make sure your database.mac file is on the TSM server machine (as opposed
to the client machine).

Run the following admin command:

   define script database "C:\Program
Files\Tivoli\TSM\server1\database.mac"

Note: "database" is the name of the script, and can be whatever you want.

Note: Specify the fully-qualified/fully-spelled out file name. Put in
double double quotes if the file name contains blank spaces.

Now create an Admin schedule to issue the command:

   run database

Note: "database" is the same name I used above in the DEFINE SCRIPT
command.

I think this will do the trick.

Regards,

Andy

Andy Raibeck
IBM Software Group
Tivoli Storage Manager Client Development
Internal Notes e-mail: Andrew Raibeck/Tucson/IBM@IBMUS
Internet e-mail: [EMAIL PROTECTED]

The only dumb question is the one that goes unasked.
The command line is your friend.
"Good enough" is the enemy of excellence.




Joe Cascanette <[EMAIL PROTECTED]>
Sent by: "ADSM: Dist Stor Manager" <[EMAIL PROTECTED]>
03/12/2002 10:18
Please respond to "ADSM: Dist Stor Manager"


        To:     [EMAIL PROTECTED]
        cc:
        Subject:        Re: Problem with macros



I have searched through the admin ref guide and there is no mention on how
to "Fully-Qualify" this marco. Any docs that would point this out?

Thanks

Joe

-----Original Message-----
From: Andrew Raibeck [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 12, 2002 11:27 AM
To: [EMAIL PROTECTED]
Subject: Re: Problem with macros


An update to my last response: I think the real problem is that you are
trying to launch a server macro from a client schedule (I didn't catch
that the first time around).

How about defining an admin schedule whose CMD parameter is configured to
run the "macro database.mac" command? You'll need to fully-qualify the
macro name, and the macro will have to exist on the server machine.

Regards,

Andy

Andy Raibeck
IBM Software Group
Tivoli Storage Manager Client Development
Internal Notes e-mail: Andrew Raibeck/Tucson/IBM@IBMUS
Internet e-mail: [EMAIL PROTECTED]

The only dumb question is the one that goes unasked.
The command line is your friend.
"Good enough" is the enemy of excellence.




Joe Cascanette <[EMAIL PROTECTED]>
Sent by: "ADSM: Dist Stor Manager" <[EMAIL PROTECTED]>
03/12/2002 09:17
Please respond to "ADSM: Dist Stor Manager"


        To:     [EMAIL PROTECTED]
        cc:
        Subject:        Re: Problem with macros



In lower versions of ADSM I have used this directory (saclient), however
there is no directory with my current version of TSM.

I will create this directory and put the macros in there to see what
happens.

Thanks

Joe

-----Original Message-----
From: Marc Levitan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 12, 2002 11:10 AM
To: [EMAIL PROTECTED]
Subject: Re: Problem with macros


Joe,
I believe the macro have to be located in the "saclient" directory.

Try that...

Marc Levitan
Storage Manager
PFPC Global Fund Services





                    Joe Cascanette
                    <Joe.Cascanette@        To:     [EMAIL PROTECTED]
                    CUMIS.COM>              cc:
                    Sent by: "ADSM:         Subject:     Problem with
macros
                    Dist Stor
                    Manager"
                    <[EMAIL PROTECTED]
                    T.EDU>


                    03/12/2002 11:00
                    AM
                    Please respond
                    to "ADSM: Dist
                    Stor Manager"





Server 4.2.1.12 - Windows 2000
Client 4.2.1.20  - Windows 2000

I am having problem launching macros at the server under scheduling. I
create a schedule:

DEFINE SCHEDULE STANDARD AUTOMATION DESCRIPTION="Automated TSM"
ACTION=MACRO OBJECTS=database PRIORITY=3 STARTDATE=03/12/02
STARTTIME=10:40:00 DURATION=15 DURUNITS=MINUTES PERIOD=1 PERUNITS=DAYS
DAYOFWEEK=WEEKDAY EXPIRATION=NEVER

I associate the schedule to CLIENT (the server) and I watch it launch in
the events (q ev * *). When the event launches it gives me an error in the
actlog:

03/12/2002 10:40:50 ANR0406I Session 1989 started for node CLIENT (WinNT)
(Tcp/Ip 172.16.8.35(3352)).
03/12/2002 10:40:50 ANR0484W Session 1989 for node CLIENT (WinNT)
terminated - protocol violation detected.

Here is my marco (database.mac) that is located in the BACLIENT directory:
select process form 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
/* delete schedule and add new one to reflect next script */
exit

RESCED:
issue message i "Copying of ONSITE tapes to OFFSITE tapes is not
complete...will recheck in 15 minutes"
/* will update schedule to check in 15 minutes */
exit

Reply via email to