I am still a rookie with TSM 5.1 running on Windows 2000 Server. BUT, I was able to create a few command line files (.bat) that simplify the checkout & checkin automation process. Unfortunately I still have to manually do things at a certain stage of this process.
I would like to create a script that will make everything fully automated. Here what I already done and would like to know what AND how to make it more "autonomous" 1. Checkbkp.bat dsmadmc -id=adminaccount -password=password q event * * begindate=-1 begintime=20:00 enddate=today endtime=08:00 2. Checktapes.bat (Creating txt file; Tapes (data & db) to send/receive) dsmadmc -id=adminaccount -password=password -outfile=c:\DBaenvoyer.txt select volume_name from volhistory where type='BACKUPFULL' and devclass='LTOCLASSOFF' and cast((current_timestamp-date_time)days as decimal) =0 dsmadmc -id=adminaccount -password=password -outfile=c:\DBarappel.txt q volhist type=dbb begindate=-15 enddate=-5 dsmadmc -id=adminaccount -password=password -outfile=c:\DATAaenvoyer.txt query vol stg=offpool devclass=ltoclassoff access=readwrite,readonly status=full,filling dsmadmc -id=adminaccount -password=password -outfile=c:\DATAarappeler.txt q vol stg=offpool access=offsite status=empty dsmadmc -id=adminaccount -password=password delete volhist type=dbb todate=-5 3. Chkoutvol.bat (I have to do this manualy by replacing the "120ACYL1" by the proper tape name for each individual tapes that I have to checkout) dsmadmc -id=adminaccount -password=password CHECKOUT LIBVOLUME LTO3583 120ACYL1 CHECKLABEL=NO FORCE=NO REMOVE=bulk 4. Change2OFF.bat (Changing the location) dsmadmc -id=adminaccount -password=password upd vol * access=offsite location='iron mountain' wherestg=offpool wheredev=ltoclassoff whereacc=readwrite,readonly wherestatus=filling,full 5. DailyCheck.bat (Generating a txt printout with daily info; Status of the backup, etc.) dsmadmc -id=adminaccount -password=password -outfile=c:\TSMCheck.txt run daily_check dsmadmc -id=adminaccount -password=password run daily_check PRINT C:\TSMCHECK.TXT > LPT1 6. Change2RW.bat (Changing the access to READWRITE) dsmadmc -id=adminaccount -password=password upd vol * access=readwrite location='' wherestg=offpool wheredev=ltoclassoff whereacc=offsite wherestatus=empty 7. Checkintapes.bat (Check IN the tapes that have been returned from outside) dsmadmc -id=adminaccount -password=password CHECKIN LIBVOLUME LTO3583 STATUS=SCRATCH CHECKLABEL=BARCODE SWAP=NO MOUNTWAIT=60 SEARCH=bulk P.S. What it is frustrating me the most is the relation between the batch file 2 and 3. I need to manually open the text file in order to know the tape label then I specify that tape label into the batch #3 and execute it. That part needs to be automated... BUT HOW? If somebody can help me on this one, I would be very happy.
