TSM的备份命令摘录

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
   LOCATE TYPE ID:
tapeutil -f /dev/smc0 inventory | more

1. Login to TSM: dsmadmc(user:support, pass:lovedh02)

2. TSM commands:
CHECK OUT LTO TAPE:
-----------------------------------------------------
q libv
checkout libv LTOLIB DH22S0 remove=no checklabel=no (use label of yesterday tape)
q pro
update volume DH22S0 access=unavailable
q vol DH22S0 format=detailed
------------------------------------------------------
3. Exit TSM: quit

4. commands:
tapeutil -f /dev/smc0 inventory | more
tapeutil -f /dev/smc0 move 4096 16
tapeutil -f /dev/smc0 inventory | more

5. CHANGE TAPE
exit

6. LOG BACK INTO dsmadmc

7. CHECK IN LTO TAPE:
-----------------------------------------------------
(MAKE SURE THE TAPE NUMBER IS CORRECT, WATCHOUT THE DH31S0 HAS BEEN CHANGED TO DH31S1) (today number)

delete v DH21S0 discarddata=yes [notes : delete TODAY's label]

(MAKE SURE IT IS DONE BEFORE GO INTO THE NEXT LINE)
q pro

label libv ltolib search=bulk labelsource=barcode checkin=scratch overwrite=yes

q req

rep ???<output 3 digit from command q req>
(WAIT FOR 2 MINUTES)
(MAKE SURE THERE'S NO ACTIVE PROCESS FOUND)
q pro

q libv

*******************************************************
THE FOLLOWINGS ARE COMMAND OUTPUT:

tsm: TSM>q pro

Process Process Description Status
Number
-------- -------------------- -------------------------------------------------
39 LABEL LIBVOLUME ANR8805I Labelling volumes in library LTOLIB; 0
volumes(s) labelled.\

tsm: TSM>q pro
ANR0944E QUERY PROCESS: No active processes found.
ANS8001I Return code 11.

tsm: TSM>q libv

Library Name Volume Name Status Owner Last Use Home Device
Element Type
------------ ----------- ---------- ---------- --------- ------- ------
LTOLIB DH15S0 Scratch 4,096 LTO

*******************************************************
-----------------------------
8. Exit TSM: quit
exit

--------
define volume LTOSTGPOOL DH24S0
query actlog begindate=today begintime=00:00:00 endtime=09:30:00
q drive
q path
update path tsm ltodrive01 srctype=server desttype=drive library=ltolib device=/dev/rmt1 online=yes
update path tsm ltodrive02 srctype=server desttype=drive library=ltolib device=/dev/rmt2 online=yes
checkin libv LTOLIB DH21S0 status=scratch

q actlog
help query process
select VOLUME_NAME,ACCESS from volumes where access !='READWRITE'

http://publib.boulder.ibm.com/infocenter/tivihelp/v1r1/index.jsp?topic=%2Fcom.ibm.itsmhpn.doc%2Fb_adminref_hpux217.htm
tsm script : http://www.4bcad.com/doc/misc/tsm_cmds
http://adsm.org/forum/showthread.php?21614-LABEL-LIBVOLUME-0-volume(s)-labeled-0-volume(s)-checked-in