-------------------------------------------------------------------------------- dsmadmc -id=admin -password=something -outfile=/tmp/output.$$ query actlog begindate=03/22/2007 begintime=now-1:00 enddate=03/22/20-07 endtime=now originator=all -------------------------------------------------------------------------------- export node usdcu008 filedata=backupactive devclass=LTO3_DC scratch=yes -------------------------------------------------------------------------------- hostname:1580 for web port new versions use websm dsmadmc -id=admin -pass=$TSMPWD "ba volhist" dsmadmc -id=xxx -password=xxx "q sys f=d" | grep pattern dsmadmc -id=xxx -password=xxx "q sys f=d" > /tmp/myfile dsmadmc -id=xxx -password=xxx -tabdelimited outfile=/some/path/file "q sys f=d" dsmadmc -id=xxx -password=xxx -comma outfile=/some/path/file "q sys f=d" client dsm (GUI) dsmc (CLI) dsmadmc dsmadmc -console q actlog [begint=-5] [search=1214i] q drives [f=d] q path [f=d] q proc [f=d] q stg [f=d] q acct [f=d] q sched [f=d] q assoc [f=d] q filespace host update dr online run scratch_count move data VOLID delete vol VOLID discard=yes update volume 001acb access=readwrite ducttape/scripts/drmtapecreation.ksh #Berbee pgm - compiled dsmadmc to output file/pipe dsmadmc -id=xxx -pass=xxx "q sys f=d" > /tmp/myfile dsmadmc -id=xxx -pass=xxx -tabdelimited outfile=/some/path/file "q sys f=d" dsmadmc -id=xxx -pass=xxx -comma outfile=/some/path/file "q sys f=d" dsmadmc -id=admin -pass=$TSMPWD "ba volhist" =============================================================================== SEE if it is working: #export X windows dsm - gui dsmc dsmc>q fi dsmc>quit dsmadmc dsmadmc -se=02 #run a full on a filesystem dsmadmc selective /somedir/* -sbudir=yes #run an incremental on all possible backup FS dsmc incremental dsmc i #run an incremental on a FS dsmc i /somedir -subdir=yes #restore a file dsmc rest /mp/home/user1/.profile -sub=yes -------------------------------------------------------------------------------- dsmadmc -id=admin -password=xxx -outfile=/tmp/tsm.policiy-detail.txt q pol format=detailed dsmadmc -id=admin -password=xxx -outfile=/tmp/tsm.sched-detailed.txt q sch format=detailed -------------------------------------------------------------------------------- dsmc when was the latest backup? tsm> q fi which files from your home pwd are backed up? tsm> q b * dsmc q b \* which old file versions from your home pwd are backed up? tsm> q b -ina * simple file restore to another destination: tsm> restore /user/a/anyuser/target.html /user/a/anyuser/destination.html simple file restore, with replace option: tsm> restore -rep=yes /user/a/anyuser/show.html restore with subdirs tsm> restore -rep=yes -subdir=yes /a/anyuser selection menu of old file versions: tsm> restore -ina -pick /user/a/anyuser/exp.cmz restore old file version with date limit tsm> restore -pitd=7/9/2007 /ftp/pgp/jdeprod/RTMAV098 /tmp/RTMAV098 restore old file version with specific date tsm> restore -fromdate=2007.07.09 /user/a/anyuser/x.cpp restore old directory version, with date limit and replace data with subdirs dsmc query backup -pitdate=05/12/2007 /user/a/anyuser/tesla/ dsmc restore -rep=yes -subdir=yes -pitdate=05/12/2007 /user/a/anyuser/tesla/ -------------------------------------------------------------------------------- Import tapes into scratch Get to a TSM admin prompt >label libv lib1 search=bulk checkin=scratch labelsource=barcode overwrite=yes >q pr #Should see a label libv process running >q req #Should give a three digit number >Reply (number from above) #Periodically do a to see how far it is. Takes 2-3 minutes per tape. >q pr -------------------------------------------------------------------------------- generate backupset usdcu008 KYPOC-II-SET devclass=lto3_dc scratch=yes generate backupset usdcu024 kypoc /MPORBK001 devclass=lto3_dc retention=30 scratch=yes description=kypoc wait=no query backupset usdcu024 kypoc.* query backupsetcontents usdcu024 kypoc.292947502 -------------------------------------------------------------------------------- SEE if it is working: dsmc >q fi >quit dsmadmc dsmadmc -se=02 Import tapes into scratch Go to a TSM admin prompt Label libv lib1 search=bulk checkin=scratch labelsource=barcode overwrite=yes Enter Q pr Should see a label libv process running Q req Should give a three digit number Reply (number from above) Periodically do a q pr to see how far it is. Takes 2 3 minutes per tape. hostname:1580 for web port new versions use websm dsmadmc -id=admin -pasword=$TSMPWD "ba volhist" dsmadmc -id=xxx -password=xxx q sched f=d dsmadmc -id=xxx -password=xxx "q sys f=d" | grep pattern dsmadmc -id=xxx -password=xxx "q sys f=d" > /tmp/myfile dsmadmc -id=xxx -password=xxx -tabdelimited outfile=/some/path/file "q sys f=d" dsmadmc -id=xxx -password=xxx -comma outfile=/some/path/file "q sys f=d" dsmadmc -id=xxx -password=xxx q act begind=-35 > /tmp/matt client dsmadmc -id=xxx -password=xxx q act begind=-35 > /tmp/matt dsm (GUI) dsmc (CLI) dsmadmc dsmadmc -console q actlog [begint=-5] [search=1214i] q drives [f=d] q path [f=d] q proc [f=d] q stg [f=d] q acct [f=d] q sched [f=d] q assoc [f=d] q filespace host update dr online run scratch_count move data VOLID delete vol VOLID discard=yes update volume 001acb access=readwrite ducttape/scripts/drmtapecreation.ksh #Berbee pgm - compiled dsmadmc to output file/pipe dsmadmc -id=xxx -pass=xxx "q sys f=d" > /tmp/myfile dsmadmc -id=xxx -pass=xxx -tabdelimited outfile=/some/path/file "q sys f=d" dsmadmc -id=xxx -pass=xxx -comma outfile=/some/path/file "q sys f=d" dsmadmc -id=admin -pass=$TSMPWD "ba volhist" =============================================================================== TSM daily review both emails tower2> /tsm/drfiles ps -ef | grep drtape #to see if tar/ftp is still running =============================================================================== BCP before BCP ------------ stop replication before the day of call in tapes after BCP ------------ need to be able to: tower2> rsh drtsmserv =============================================================================== My TSM cheat sheet To create an NT scheduler service, from the command line: dsmcutil install sched /name:tsm_scheduler /node: /password: /autostart:yes Changing start time for a schedule: update schedule standard daily_files startt=13:15 Adding nodes to a schedule define association standard daily_files Removing nodes from a schedule delete association standard daily_files List the contents of the storage pool(s) I;e. who is using up how much.. q filespace Modify storage pool migration percentage update stgpool hi= Audit the library after opening main door. audit library checklabel=barcode Modifying DB2 TDP stuff (this example was for specifying a mgmtclass) db2 update db cfg for dwbprod using adsm mgmtclass dbclass resetting another admins password update admin Reverting private volumes with no data (i.e. orphaned tapes) to Scratch volumes. checkout libv lib01 checklabel=no remove=bulk label libv checkin=scratch search=bulk labelsource=barcode overwrite=yes #### MAKE SURE TO REPLY TO REQUEST NUMBER FROM ABOVE!!! Displaying a list of all the tapes containing data for a particular node: show volumeusage Proper way to TSM server: (MUST BE ROOT) cd /usr/tivoli/tsm/server/bin nohup ./dsmserv quiet > /dev/null 2>&1 & Restarting the TSM-synch for DR/BCP on the original (Tower2) server: (As ROOT) nohup /home/drtsmusr/scripts/multi-vol.mkdrfiles.ksh > /dev/null 2>&1 & Restoring files to a different system. Just start the TSM client on the target machine with the virtualnodename parm. dsm -virtualnodename=name_of_source_node On windows, use dsm -nodename=ABCDEF Defining a non-admin schedule command objects= def sched standard action= startt= incremental note: double-quotes must be surrounded by single-quotes in order to take effect. Defining an administrative schedule def sched type=admin cmd= reclaim=##>) active=yes descr= start=