Williams225
asked on
IBM TSM : How to automate some administrative tasks
Hello experts,
Everyday , I usually perform manually this three commands on tsm to recup volumes.
#BACKUP STG NTDISKPOOLF COPY POOL
#Expire inventory
#Reclaim STG NTDISKPOOLF
How can I do to automate these tasks every morning?
Everyday , I usually perform manually this three commands on tsm to recup volumes.
#BACKUP STG NTDISKPOOLF COPY POOL
#Expire inventory
#Reclaim STG NTDISKPOOLF
How can I do to automate these tasks every morning?
To make it complete - here is how to create a script and integrate it into an admin schedule:
DEF SCR BKUP_EXP_RECL desc="Backup Stgpool, Expire inventory and Reclaim Stgpool"
UPD SCR BKUP_EXP_RECL "BACKUP STGP NTDISKPOOLF COPY_POOL WAIT=YES" line=10
UPD SCR BKUP_EXP_RECL "EXPIRE INVENTORY QUIET=YES WAIT=YES" line=20
UPD SCR BKUP_EXP_RECL "RECLAIM STGP NDISKPOOLF WAIT=YES" line=30
DEF SCHED BKUP_EXP_RECL T=A CMD="RUN BKUP_EXP_RECL" STARTTIME=06:00:00 PERIOD=1 PERUNITS=DAYS DAYOFWEEK=ANY DESC="Backup Storage Pool NDISKPOOLF, Expire Inventory, Reclaim Storage Pool NDISKPOOLF"
ASKER
thats great , thanx a lot .
Is it possible for me to add it to the maintenance script via command line?
Is it possible for me to add it to the maintenance script via command line?
I don't know your maintenance script. What does it do? Is it a regular TSM script?
If so, you can display it on the dsmadmc command line with
Q SCR scriptname F=L
If you could post the outcome I could check what we can do.
If so, you can display it on the dsmadmc command line with
Q SCR scriptname F=L
If you could post the outcome I could check what we can do.
ASKER
Hello Woolmilkporc,
I don't have access to the "maintenance script" via the GUI, its not working since the upgrade of tsm server to version 7.0 . I will try to download the fix.
This is why i am trying to edit the script via the command line
It seems that the name of the maintenance script is MAINTENANCE_PLAN_CUSTOM
The output of the command Q SCR scriptname F=L doesn't show result.
I don't have access to the "maintenance script" via the GUI, its not working since the upgrade of tsm server to version 7.0 . I will try to download the fix.
This is why i am trying to edit the script via the command line
It seems that the name of the maintenance script is MAINTENANCE_PLAN_CUSTOM
The output of the command Q SCR scriptname F=L doesn't show result.
Q SCR MAINTENANCE_PLAN_CUSTOM F=L
of course ...
of course ...
It seems that this script doesn't do anything!
What is it supposed to do?
Is it scheduled?
Run this to check:
What is it supposed to do?
Is it scheduled?
Run this to check:
select SCHEDULE_NAME, STARTTIME, COMMAND from admin_schedules where upper(COMMAND) like '%MAINTENANCE%'
Any result?
ASKER
OK, this empty script runs at 17:28, probably daily. Very strange.
Adding our three commands to it will be quite simple. Shall we do it?
Adding our three commands to it will be quite simple. Shall we do it?
ASKER
yes we should definately add the commands ,
waiting for the commands
waiting for the commands
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Changing the start time of a schedule is easy, but running it twice a day is only possible
if the difference between the start times is exactly 12 hours
(otherwise the start time would "wander" through the day).
That's because only one "start time" can ce specified.
1) Change the start time to 6am:
If the script must run twice a day with a time difference other than 12 hours we'll have to define another admin schedule to achieve this. That's not a big thing, though.
if the difference between the start times is exactly 12 hours
(otherwise the start time would "wander" through the day).
That's because only one "start time" can ce specified.
1) Change the start time to 6am:
UPD SCHED MAINTENANCE T=A STARTTIME=06:00:00 DAYOFWEEK=ANY
2) Change the start times to 6am and 6pm:UPD SCHED MAINTENANCE T=A STARTTIME=06:00:00 PERIOD=12 PERUNITS=HOURS DAYOFWEEK=ANY
The latter is very uncommon in TSM, but it will work.If the script must run twice a day with a time difference other than 12 hours we'll have to define another admin schedule to achieve this. That's not a big thing, though.
ASKER
thanx a lot to woolmilkporc, he is a real tsm expert!
On the dsmadmc command line run (for example):
Open in new window
Open in new window
Open in new window
The above commands define standard type schedules. There is also an enhanced schedule style which allows for specifying a month (Jan, Feb, Mar,...,Dec), a week of month (first, second, ..., last) and a day of month (1,2,3,...31) instead of a period and a period unit. To define an enhanced-style schedule add "SCHEDSTYLE=ENHANCED" (or "SCHEDS=E") to the definition. Please run "HELP DEF SCHED" for more detail.
To avoid overlapping of the three processes you can add the commands (BACKUP ..., EXPIRE ..., RECLAIM ...) to a TSM script (don't forget WAIT=YES) and define a single schedule with CMD="RUN scriptname".
If you're interested in creating TSM scripts please let me know.