CLI scripting question ....

tstrauch

ADSM.ORG Member
Joined
Jul 20, 2006
Messages
4
Reaction score
0
Points
0
Website
Visit site
For consistency, we have scripted the installation of TSM on our Linux servers. A fairly trivial task. I am now being asked to extend the script to automatically verify that TSM is functioning correctly. For the most part, this is also trivial if it's an upgrade to an exiting TSM installation. For installation on a new node, additional input is required and I have not been able to figure out which options (if any) to use. On every server, it asks for the node name and the PW for the node. Which options would handle those? On servers that are running e-Directory from Novell, I am also prompted for the local admin ID and PW. Are there options to provide those as well? Thanks in advance.
 
It is easy to script setting up TSM clients on servers but not that straightforward when trying to run dsmc for the first time so that passwords can be saved on the node.

The TSM environment 'lives' on its own and would not readily accept parsed information from an external, OS level script. To cut the chase, I haven't found a practical foolproof way of entering NODE NAMES and PASSWORDS.

Anyone?
 
Last edited:
i know that in windoze... it can done with a vbscript. I've automatated my client configuration throught a HTA/vbscript application... i'll ask my unix admin if he was able to "pass" the login and password into a script.

Will be back on monday with the answer
 
If it's just a shell script, after the client is configured on the TSM server and node, you can add a line to set the password with:

dsmc set password <oldpassword> <newpassword>

eg. if the password is adsm123:

dsmc set password adsm123 adsm123
 
If it's just a shell script, after the client is configured on the TSM server and node, you can add a line to set the password with:

dsmc set password <oldpassword> <newpassword>

eg. if the password is adsm123:

dsmc set password adsm123 adsm123

I think you missed one point - how do you register the node for the first time assuming registration type = closed?
 
Hmm, might not fully understand the question, but in our environment we have closed registration and just use dsmadmc in the install script to register the node / set the password on the TSM server. At the end of the script, dsmc sets the password on the node. With Windows the password can be set using dsmcutil.
 
I made a batch file to register nodes on tsm servers. You pass it your username and password during the launch and it saves those items to perform additional queries. It also shows you a node count per schedule allowing you to better balance your backup load. In this case you feed it a default password like SECRET and it will change that password in 90 days. Program is called REGNODE.

I would go to the command line and run the following command:

REGNODE MYUSERNAME MYPASSWORD MYNODENAME NODESCHEDULE

This is the batch file:

echo off
cd "C:\program files\tivoli\tsm\baclient"
:start
dsmadmc -optfile=tsm1dsm.opt -id=%1 -pa=%2 select count(*) as nodes, schedule_name from associations group by schedule_name order by nodes
set choice=
set /p choice=Do you want to keep %4 (Y/N):
if '%choice%'=='n' goto finsih
if '%choice%'=='y' goto install
if '%choice%'=='N' goto finsih
if '%choice%'=='Y' goto install
goto finsih
:install
dsmadmc -optfile=tsm1dsm.opt -id=%1 -pa=%2 reg node %3 SECRET PASSEXP=90 USERID=none DOMAIN=STANDARD CLOPTSET=WINDOWS FORCEPWRESET=NO
dsmadmc -optfile=tsm1dsm.opt -id=%1 -pa=%2 def assoc standard %4 %3
:finsih
 
When installing the client on the server I use another script to detect what version of OS it is, whether it's test or prod, and what kind of storage it goes to. I then feed it to this:

msiexec /i "z:\tsm_images\IBM Tivoli Storage Manager Client.msi" RebootYesNo="No" REBOOT="Suppress" ALLUSERS=1 INSTALLDIR="c:\program files\tivoli\tsm" ADDLOCAL="BackupArchiveGUI,BackupArchiveWeb,ApiRuntime" TRANSFORMS=1033.mst /qn"
call notepad.exe "c:\program files\tivoli\tsm\baclient\dsm.opt"
C:
cd "c:\program files\tivoli\tsm\baclient"
set P=SECRET
dsmcutil install scheduler /name:"TSM Scheduler Service" /node:%1 /password:%P% /autostart:no /startnow:no
dsmcutil install cad /name:"TSM Client Acceptor" /node:%1 /password:%P% /autostart:yes /startnow:no
dsmcutil update cad /name:"TSM Client Acceptor" /cadschedname:"TSM Scheduler Service"
dsmcutil install remoteagent /name:"TSM Remote Client Agent" /node:%1 /password:%P% /partnername:"TSM Client Acceptor" /startnow:no
dsmcutil start /name:"TSM Client Acceptor"
pause
dsmc q sched
pause
dsm.exe
%SystemRoot%\explorer.exe "C:\program files\tivoli\tsm\baclient"
net use z: /delete
exit

The above script allows you to customize your options file - then queries the schedule and opens the GUI to ensure comms with the server and functional passwords/schedules.
 
Jeff - Your comments would help out a lot if I had administrative access to the backend. Unfortunately, I'm a consumer, so use of dsmadmc command is not possible.
 
Back
Top