[IT Services] Using the TSM Client Command Line Interface for Backup & Restore
We want to use cookies to collect data on how people use our site. Click here to accept, and dismiss this notice. For more information, and to change your preferences later, see our cookie policy. If you prefer not to accept them you may disable them (this sets a cookie).
Using the TSM Client Command Line Interface for Backup & Restore
1. Introduction
This section will first provide an introduction to the TSM Command Line Interface (CLI) and then describe how to manually back up and restore files on the local machine. The screen shots and descriptions that follow may refer to older TSM clients, but with the exception of the file specifications the syntax is generic to all platforms.
2.2. Mac
Open [ e m n l from [ p l c t o s | [ t l t e ]and type s d d m . You should see a prompt of the Tria] Apiain] Uiiis uo sc form:
IMTvl SoaeMngr B ioi trg aae CmadLn Bcu/rhv Cin Itrae omn ie akpAcie let nefc Cin Vrin5 Rlae5 Lvl20 let eso , ees , ee . Cin dt/ie 1-620 1:63 let aetm: 80-09 13:7 ()Cprgtb IMCroainadohrs 19,20.AlRgt Rsre. c oyih y B oprto n te() 90 08 l ihs eevd
www.oucs.ox.ac.uk/hfs/backup/allcli/index.xml?splitLevel=-1 1/10
10/8/12
[IT Services] Using the TSM Client Command Line Interface for Backup & Restore
Nd Nm:AC13-ATPOC oe ae BD24LPO-US Ssinetbihdwt sre O_F_3 AXR/00 eso salse ih evr XHSB: I-S60 Sre Vrin5 Rlae5 Lvl11 evr eso , ees , ee . Sre dt/ie 1-620 1:63 Ls acs:1-620 0:13 evr aetm: 80-09 13:7 at ces 80-09 25:0 tm s>
2.3. Unix/Linux
Run d m as root from the shell prompt (e.g., in Ubuntu, run s d d m ). You should see a prompt of the form: sc uo sc
IMTvl SoaeMngr B ioi trg aae CmadLn Bcu/rhv Cin Itrae omn ie akpAcie let nefc Cin Vrin5 Rlae5 Lvl20 let eso , ees , ee . Cin dt/ie 1-620 1:63 let aetm: 80-09 13:7 ()Cprgtb IMCroainadohrs 19,20.AlRgt Rsre. c oyih y B oprto n te() 90 08 l ihs eevd Nd Nm:AC13-ATPOC oe ae BD24LPO-US Ssinetbihdwt sre O_F_3 AXR/00 eso salse ih evr XHSB: I-S60 Sre Vrin5 Rlae5 Lvl11 evr eso , ees , ee . Sre dt/ie 1-620 1:63 Ls acs:1-620 0:13 evr aetm: 80-09 13:7 at ces 80-09 25:0 tm s>
2.4. Netware
Type l a d m at the console. od sc
3. Accessing Help
Online help for TSM commands, options and error messages is available by typing h l at the t m prompt. The result will be ep s> similar to below:
Tefloighl tpc aeaalbe h olwn ep ois r vial. Etrtenme o tedsrdhl tpco ''t qi, ne h ubr f h eie ep oi r q o ut ''t srl dw,''t srl u. d o col on u o col p 0-Smayo Cags umr f hne 1-UigCmad sn omns 2-Slc fo tecmad lse blw eet rm h omns itd eo: 3- ACIE RHV 4- BCU D2D AKP BUB 5- BCU GOP AKP RU 6- BCU IAE AKP MG 7- BCU NS AKP A 8- BCU WS AKP A 9- CNE POES ACL RCS 1 - CNE RSOE 0 ACL ETR 1 - DLT ACS 1 EEE CES 1 - DLT ACIE 2 EEE RHV 1 - DLT BCU 3 EEE AKP 1 - DLT FLSAE 4 EEE IEPC 1 - DLT GOP 5 EEE RU 1 - EPR 6 XIE 1 - HL 7 EP 1 - ICEETL 8 NRMNA
Note that commands and options may be abbreviated to a short form as indicated by capitalisation of words in the syntax entry for a command. Thus, for example, q e y f l s a ecan be abbreviated to q f . Options and commands can also be included on ur iepc i the original command line so, using the above example, on a Netware machine you can run l a d m q f to just run a query of od sc i the current partitions backed up. Obviously, more complex queries and commands can be similarly run in the same manner.
www.oucs.ox.ac.uk/hfs/backup/allcli/index.xml?splitLevel=-1
2/10
10/8/12
[IT Services] Using the TSM Client Command Line Interface for Backup & Restore
The following query commands illustrate typical command syntax and output.
Note that the include / exclude directives are listed at the partition level first, then the directory / folder level and finally at the file level. The order they are displayed above is the order in which these directives are applied by TSM. You will note that the order of the directives at any one level is the opposite of the order in which they appear in the options file. That is, TSM reads the directives listed in options file from the bottom up.
10/8/12
[IT Services] Using the TSM Client Command Line Interface for Backup & Restore
At the t m prompt enter q f to list which partitions have been backed up: s> i
* Wnos* * idw * # -1 Ls Ic Dt at nr ae ------------0-520 1:65 10-02 94:9 Tp ye --NF TS Fl SaeNm ie pc ae -------------\tnalsoc\$ \etce.usc
* Mc* * a * tm qf s> i # Ls Ic Dt at nr ae -------------1 0-520 0:31 20-02 21:3 2 2-720 1:60 50-01 22:9 * Ui/iu * * nxLnx * tm qf s> i # Ls Ic Dt at nr ae -------------1 0-520 0:31 20-02 21:3 2 2-720 1:60 50-01 22:9 3 0-520 0:32 20-02 21:6 4 1-120 1:63 60-02 12:7 5 0-520 0:35 20-02 21:4 6 1-220 0:24 20-02 25:1 * Ntae* * ewr * # -1 2 3 4 Ls Ic Dt at nr ae ------------0-520 0:34 20-02 02:6 0-520 0:24 20-02 02:2 0-520 0:53 20-02 02:3 0-520 0:51 20-02 02:1 Tp ye --NWLN T:OG NS D NWLN T:OG NWLN T:OG Fl SaeNm ie pc ae -------------NM1SS SS\Y: NM1NS SS\D: NM1UR SS\S: NM1AP: SS\PS
Tp ye --HS F HS F
Tp ye --US F US F US F US F US F US F
Mm Cas gt ls
AIFl / ie
4/10
10/8/12
[IT Services] Using the TSM Client Command Line Interface for Backup & Restore
-----------52 B 2-420 0:20 1 40-02 25:9 * Ntae* * ewr * tm qb UR/as s> a S:in Sz ie Bcu Dt akp ae -----------0 B 0-520 0:53 20-02 02:2
--------SADR TNAD
Note that the Windows client lists the directory in UNC format. This format can also be used for the file specification in the query. If you just add a trailing * (star) as a wildcard in the above query, TSM will only return those files and directories backed up immediately below the directory path given in the query
tmqb /oein/rjcs* s> a hm/aspoet/ Sz ie Bcu Dt akp ae -----------52 1-920 1:70 1 20-01 95:9 104 0-220 0:65 ,2 81-01 24:3 52 1-920 1:70 1 20-01 95:9 52 2-420 0:25 1 40-02 02:6
Mm CasAIFl gt ls / ie ----- -------- - -SADR TNAD A /oein/rjcshs16 hm/aspoet/f00 SADR TNAD A /oein/rjcshm1ef hm/aspoet/s4pr SADR TNAD A /oein/rjcshm1et hm/aspoet/s4ts SADR TNAD A /oein/rjcshm2p hm/aspoet/s4ug
If you want to query all the current files and directories backed up under a directory and all its subdirectories you need to add the s b i = e option as below: udrys
tm qb /oein/rjcs*-udrys s> a hm/aspoet/ sbi=e Sz ie Bcu Dt akp ae Mm CasAIFl gt ls / ie ---------------- -------- - -52 1-920 1:70 1 20-01 95:9 SADR TNAD A /oein/rjcshs16 hm/aspoet/f00 104 0-220 0:65 ,2 81-01 24:3 SADR TNAD A /oein/rjcshm1ef hm/aspoet/s4pr 52 1-920 1:70 1 20-01 95:9 SADR TNAD A /oein/rjcshm1et hm/aspoet/s4ts 52 2-420 0:25 1 40-02 02:6 SADR TNAD A /oein/rjcshm2p hm/aspoet/s4ug 104 1-920 1:70 ,2 20-01 95:9 SADR TNAD A /oein/rjcshs16ts hm/aspoet/f00/et 104 1-920 1:70 ,2 20-01 95:9 SADR TNAD A /oein/rjcshs16ts/et hm/aspoet/f00/etts2 1,4 0-220 0:12 208 41-01 20:9 SADR TNAD A /oein/rjcshm1eftbe hm/aspoet/s4pr/als 5,2 3-420 0:52 036 00-02 13:6 SADR TNAD A /oein/rjcshm2p/M703 hm/aspoet/s4ugPR02 5,2 2-420 0:81 036 70-02 02:5 SADR TNAD A /oein/rjcshm2p/M709 hm/aspoet/s4ugPR09 1,1 2-420 0:25 103 40-02 02:6 SADR TNAD A /oein/rjcshm2p/dcek hm/aspoet/s4ugm5hc
Note that file specifications with spaces in them will need to be quoted. Thus to query all the files backed up under C \ y :M D c m n sand any sub-directories below it, the following input would be required: ouet
tm qb ":M Dcmns* -udrys s> a C\y ouet\" sbi=e
By default only the current versions of files are listed. In order to query both current active and previous inactive versions of files, add the - n c i e option to the query: iatv
tm qb /oein/rjcs*-udrys-ncie s> a hm/aspoet/ sbi=e iatv Sz ie Bcu Dt akp ae Mm CasAIFl gt ls / ie ---------------- -------- - -52 1-920 1:70 1 20-01 95:9 SADR TNAD A /oein/rjcshs16 hm/aspoet/f00 104 0-220 0:65 ,2 81-01 24:3 SADR TNAD A /oein/rjcshm1ef hm/aspoet/s4pr 52 1-920 1:70 1 20-01 95:9 SADR TNAD A /oein/rjcshm1et hm/aspoet/s4ts 52 2-420 0:25 1 40-02 02:6 SADR TNAD A /oein/rjcshm2p hm/aspoet/s4ug 104 1-920 1:70 ,2 20-01 95:9 SADR TNAD A /oein/rjcshs16ts hm/aspoet/f00/et 104 1-920 1:70 ,2 20-01 95:9 SADR TNAD A /oein/rjcshs16ts/et hm/aspoet/f00/etts2 1,4 0-220 0:12 208 41-01 20:9 SADR TNAD A /oein/rjcshm1eftbe hm/aspoet/s4pr/als 848 0-220 0:11 ,4 31-01 13:8 SADR TNAD I /oein/rjcshm1eftbe hm/aspoet/s4pr/als
www.oucs.ox.ac.uk/hfs/backup/allcli/index.xml?splitLevel=-1 5/10
10/8/12
[IT Services] Using the TSM Client Command Line Interface for Backup & Restore
3-420 0:52 00-02 13:6 2-420 0:81 70-02 02:5 2-420 0:25 40-02 02:6 2-420 1:00 30-02 71:8
A A A I
Note how the previous versions of files are marked by an I(for Inactive) in the A/I column. Unix and Linux users should be aware of potential confusion of how TSM stores files in nested file spaces. This can arise in the following situation: A user backs-up a file m c n . x on the / s partition in the / s / o a / t directory. yoftt ur urlclec Subsequently, a new disk partition is mounted at / s / o a , or it is defined as a virtualmountpoint. Running the command: urlcl
tm qb /s/oa/t/ s> a urlclec*
will not list the m c n . x file. This is because TSM always looks for a file in the filespace (partition) with the longest name that yoftt matches the file specification you include in the command. In the above example, the file was not backed up under the / s / o a urlcl filespace but under the / s filespace. To tell TSM to look for a file in latter filespace you must specify the filespace explicitly using ur braces, as below:
tm qb {ur/oa/t/ s> a /s}lclec*
To run an incremental by date backup of the above, add the - n r y a e option, as in: icbdt
tm ic C D F -nryae s> nr : : : icbdt
To back up entire disk volumes irrespective of whether files have changed since the last backup, use the s l c i ecommand with eetv a wildcard and - u d r y s as below: sbi=e
tm slC\ D\ F\ s> e :* :* :* tm sl/ s> e * tm sl/ /s/ s> e * ur* /oe* hm/ tm slUR* SS* AP: s> e S: Y: PS* -uys s=e -uys s=e -uys s=e -uys s=e * Wnos * idw * Mc * a * Ui/iu * nxLnx * Ntae * ewr
www.oucs.ox.ac.uk/hfs/backup/allcli/index.xml?splitLevel=-1
6/10
10/8/12
[IT Services] Using the TSM Client Command Line Interface for Backup & Restore
AS01 Ivlddmi nm etrd 'hm/aspoet/s** N17E nai oan ae nee: /oein/rjcshm/' tm sl/oein/rjcshm/ -uys s> e hm/aspoet/s** s=e SlcieBcu fnto ivkd eetv akp ucin noe. AS01 Ivldsac fl seiiain'hm/aspoet/s** etrd N18E nai erh ie pcfcto /oein/rjcshm/' nee
You can, however, enter several file specifications on the command line, as below:
* Wnos* * idw * tm ic ":M DcmnsWr dc\" ":M Dcmnshm dc\"-uys s> nr C\y ouet\od os* C\y ouet\tl os* s=e * Mc* * a * tm ic /sr/as* /sr/et*-uys s> nr Uesin/ Uests/ s=e * Ui/iu * * nxLnx * tm ic /oein/rjcshm1et* /oein/rjcshm1ef*-uys s> nr hm/aspoet/s4ts/ hm/aspoet/s4pr/ s=e * Ntae* * ewr * tm ic URin/rjcstm* "S:aspoet/e hm/"-uys s> nr S:aspoet/s/ URin/rjcsnw tl* s=e
Note from the first example of each restore above that in order to specify a directory as a destination, you need a trailing / (slash) at the end of the destination-filespec. Otherwise TSM may overwrite a file of the same name. The second example demonstrates a filename in the destination-filespec. Restores of single files cannot be restarted if interrupted. In this case you will need to restore the file afresh.
10/8/12
[IT Services] Using the TSM Client Command Line Interface for Backup & Restore
tm rs ":M DcmnsWr dc\" ":M Dcmnsrsoe"-uys s> et C\y ouet\od os* C\y ouet\etr\ s=e * Mc* * a * tm rs /sr/aspoet/s4ts/ /sr/aspoet/etr/-uys s> et Uesin/rjcshm1et* Uesin/rjcsrsoe s=e * Ui/iu * * nxLnx * tm rs /oein/rjcshm1et* /oein/rjcsrsoe -uys s> et hm/aspoet/s4ts/ hm/aspoet/etr/ s=e * Ntae* * ewr * tm rs URin/rjcstm* "S:aspoet/etr/ -uys s> et S:aspoet/s/ URin/rjcsrsoe" s=e
Note that in order to restore a full directory and the contents of all its sub-directories you need the - u y soption. It is always good s=e practice to terminate the destination-filespec with a trailing / (slash) if the element in the destination-filespec is a directory. As this restore is wild-carded, it can be restarted if interrupted due to user input (Ctrl-C), server error or communications error. Restartable restores can be queried via q r s and will restart at the point of interruption. et
As with 'Restoring multiple files and directories' above, this restore is wild-carded and thus can be restarted if interrupted.
10/8/12
[IT Services] Using the TSM Client Command Line Interface for Backup & Restore
18 |2-420 0:25 7. 40-02 02:6 13 K A /oein/rjcshm22ugdmot .5 B hm/aspoet/s415p/s.p 19 |2-420 0:25 7. 40-02 02:6 41 K A /oein/rjcshm22ugdmss .7 B hm/aspoet/s415p/s.y 10 |2-420 0:25 8. 40-02 02:6 11 K A /oein/rjcshm22ugdmiftb .3 B hm/aspoet/s415p/smgsa 11 |2-420 0:25 8. 40-02 02:6 73 K A /oein/rjcshm22ugflsses .0 B hm/aspoet/s415p/ieytm 12 |2-420 0:25 8. 40-02 02:6 12 K A /oein/rjcshm22ugicec .5 B hm/aspoet/s415p/nlxl 13 |2-420 0:25 8. 40-02 02:6 18 B A /oein/rjcshm22ugicec.c 9 hm/aspoet/s415p/nlxlde 14 |2-420 0:25 8. 40-02 02:6 21 B A /oein/rjcshm22ugicec.xss 9 hm/aspoet/s415p/nlxlo_y 15 |2-420 0:25 8. 40-02 02:6 60 B A /oein/rjcshm22ugicec.et 5 hm/aspoet/s415p/nlxlts 16 |2-420 0:25 8. 40-02 02:6 60 B A /oein/rjcshm22ugiedcn 7 hm/aspoet/s415p/nt.of 17 |2-420 0:25 8. 40-02 02:6 27 K A /oein/rjcshm22ugiitb .1 B hm/aspoet/s415p/nta 18 |2-420 0:25 8. 40-02 02:6 10 K A /oein/rjcshm22ugm5hc .0 B hm/aspoet/s415p/dcek 19 |2-420 0:25 8. 40-02 02:6 7.3K A /oein/rjcshm22ugmrpr.243ot 92 B hm/aspoet/s415p/keot002.u 10 |2-420 0:25 9. 40-02 02:6 42 K A /oein/rjcshm22ugsaa.243ot .7 B hm/aspoet/s415p/smp002.u 11 |2-420 0:20 9. 60-02 10:8 1.8M A /oein/rjcshm22ugPR02/02.a 27 B hm/aspoet/s415p/M703703tr 12 |2-420 1:33 9. 50-02 63:6 1.8M I /oein/rjcshm22ugPR02/02.a 27 B hm/aspoet/s415p/M703703tr 0----1----2----3----4----5----6----7----8----9-----0----0----0----0----0----0----0----0----0<>U <>Dw <>Tp <>Bto <#=ih <#=et U=p D=on T=o B=otm R>Rgt L>Lf <#=ooLn # <>Tgl Ety <>Slc Al <>Dslc Al G>Gt ie #=oge nr +=eet l -=eeet l <:+=eetARne<:-=eeetARne <>O <>Cne ##>Slc ag ##>Dslc ag O=k C=acl pc> ik
You are now in the pick interface and can select individual files to restore via the number to the left, scroll up or down via Uand Das described at the bottom of each listing of files. Remember to issue the destination-filespec with the original restore command if you want to prevent overwriting current versions of files with older versions.
where DEAD.MACHINE should be substituted for the nodename of the machine to be restored. You will then be prompted for the TSM password for this machine. Querying and restoring the filestore is then as in the previous section, 6. Restoring your data. You will probably want to restore to a different destination to the original files to prevent overwriting files on the local machine, as below:
tm rs D\ s> et :* D\ETR\ :RSOE -uys s=e * Wnos * idw
9/10
www.oucs.ox.ac.uk/hfs/backup/allcli/index.xml?splitLevel=-1
10/8/12
[IT Services] Using the TSM Client Command Line Interface for Backup & Restore
tm rs /oe*/cac/ s> et hm/ srth -uys s=e tm rs SUC-EVRUR* URrsoe s> et ORESRE\S: S:etr/
-uys s=e
The equivalent commands on Windows and Netware machines would look like:
tm stacbcu c\ aohrp sse s> e c akp :* nte.c ytm tm stacbcu UR* aohrsr ro s> e c akp S: nte.v ot * Wnos * idw * Ntae * ewr
The current access list can be queried and deleted using the q e y a cand d l t a ccommands. ur c eee c Once access has been granted from another machine, you can query and restore files from that machine to your local machine using the - r m o eoption, as below: fond
tm qfls-rmoeAOHRND s> ie fond=NTE.OE tm rs -rmoeAOHRND /oe** /oersoe s> et fond=NTE.OE hm// hm/etr/
set in your options file, it is recommended you manually re-set your TSM password. To do this at the t m prompt enter: s>
tm stpswr odasod nwasod s> e asod lpswr epswr
University of Oxford.
About Contact Privacy Cookies Feedback Accessibility IT Services documents are available in alternative formats through advance request from the Help Centre. Written by Ian Smith, April 2002. Latest revision Mon, 17 Sep 2012 [Change Page Style: Simple text | Printable version | Normal ]
www.oucs.ox.ac.uk/hfs/backup/allcli/index.xml?splitLevel=-1
10/10