今天在家做了备份,恢复的实验,虽然失败,但是学习了:
[root@sheng bin]# ./dsmc selective /root/test/ -subdir=yes
IBM Tivoli Storage Manager
Command Line Backup/Archive Client Interface
Client Version 5, Release 5, Level 1.0
Client date/time: 06/16/2011 16:31:05
(c) Copyright by IBM Corporation and other(s) 1990, 2008. All Rights Reserved.
Node Name: TSM_SVR1
Please enter your user id <TSM_SVR1>: admin
Please enter password for user id "ADMIN":
Session established with server TSM_SVR1: Linux/i386
Server Version 5, Release 5, Level 1.0
Server date/time: 06/16/2011 16:31:05 Last access: 06/16/2011 16:23:05
Selective Backup function invoked.
Directory--> 4,096 /root/test [Sent]
Directory--> 4,096 /root [Sent]
Directory--> 4,096 /root/test/shp [Sent]
Normal File--> 0 /root/test/f1 [Sent]
Normal File--> 78 /root/test/file [Sent]
Normal File--> 41 /root/test/shp/er [Sent]
Retry # 1 Directory--> 4,096 /root/test ** Unsuccessful **
ANS1228E Sending of object '/root/test' failed
ANS1312E Server media mount not possible
Retry # 1 Directory--> 4,096 /root ** Unsuccessful **
ANS1228E Sending of object '/root' failed
ANS1312E Server media mount not possible
Retry # 1 Directory--> 4,096 /root/test/shp ** Unsuccessful **
ANS1228E Sending of object '/root/test/shp' failed
ANS1312E Server media mount not possible
Retry # 1 Normal File--> 0 /root/test/f1 ** Unsuccessful **
ANS1228E Sending of object '/root/test/file' failed
ANS1312E Server media mount not possible
ANS1228E Sending of object '/root/test/shp/er' failed
ANS1312E Server media mount not possible
ANS1999E Selective processing of '/root/test/*' stopped.
Total number of objects inspected: 6
Total number of objects backed up: 0
Total number of objects updated: 0
Total number of objects rebound: 0
Total number of objects deleted: 0
Total number of objects expired: 0
Total number of objects failed: 5
Total number of bytes transferred: 1,005 B
Data transfer time: 0.00 sec
Network data transfer rate: 14,870.38 KB/sec
Aggregate data transfer rate: 0.55 KB/sec
Objects compressed by: 0%
Elapsed processing time: 00:00:01
ANS1312E Server media mount not possible
在实际工作中,如果发现没有备份,很多是node 节点没有配好,
tsm:> q node:
发现:tsm: TSM_SVR1>q node
Node Name Platform Policy Domain Days Since Days Since Locked?
Name Last Acce- Password
ss Set
------------------------- -------- -------------- ---------- ---------- -------
CLIENT (?) STANDARD 26 26 No
TSM_SVR1 Linux86 DO_VTL <1 26 No
tsm: TSM_SVR1>
还是没有。
上次在工作中,就是因为更新了node ,后来申请了root, 在client 端:/opt/tivoli/tsm/client/ba/bin/dsmc
然后提示输入id/passwd
再把dsmc 的process 启动: ./demc &schedule
好,下面加一下新的node;
tsm: TSM_SVR1>register node tsm_svr1 panode1 domain=do_vtl01 archdelete=yes backdelete=yes
ANR2147E REGISTER NODE: Node TSM_SVR1 is already registered.
ANS8001I Return code 10.
现在把原来的node 给udpate:
tsm: TSM_SVR1>update node tsm_svr1 domain=do_vtl01
ANR2063I Node TSM_SVR1 updated.
tsm: TSM_SVR1>q domain
Policy Activated Activated Number of Description
Domain Policy Default Registered
Name Set Mgmt Nodes
Class
--------- --------- --------- ---------- ------------------------
DO_VTL PS_VTL MC_VTL 0 Domain for VTL library
DO_VTL01 PS_VTL01 MC_VTL01 1 Domain for vtl
STANDARD STANDARD STANDARD 1 Installed default policy
domain.
tsm: TSM_SVR1>q node
Node Name Platform Policy Domain Days Since Days Since Locked?
Name Last Acce- Password
ss Set
------------------------- -------- -------------- ---------- ---------- -------
CLIENT (?) STANDARD 26 26 No
TSM_SVR1 Linux86 DO_VTL01 <1 26 No
好下面再进行备份;
[root@sheng bin]# ./dsmc selective /root/test/ -subdir=yes
IBM Tivoli Storage Manager
Command Line Backup/Archive Client Interface
Client Version 5, Release 5, Level 1.0
Client date/time: 06/16/2011 17:05:43
(c) Copyright by IBM Corporation and other(s) 1990, 2008. All Rights Reserved.
Node Name: TSM_SVR1
Please enter your user id <TSM_SVR1>: admin
Please enter password for user id "ADMIN":
Session established with server TSM_SVR1: Linux/i386
Server Version 5, Release 5, Level 1.0
Server date/time: 06/16/2011 17:05:43 Last access: 06/16/2011 16:23:05
Selective Backup function invoked.
ANS1263E The active policy set does not contain any backup copy groups. The backup operation can not continue.
[root@sheng bin]#
发现./dsmc 默认的是backup 的policy
好下面进行 archive 的备份:
root@sheng bin]# ./dsmc archive /root/test/ -subdir=yes
IBM Tivoli Storage Manager
Command Line Backup/Archive Client Interface
Client Version 5, Release 5, Level 1.0
Client date/time: 06/16/2011 17:08:34
(c) Copyright by IBM Corporation and other(s) 1990, 2008. All Rights Reserved.
Archive function invoked.
Node Name: TSM_SVR1
Please enter your user id <TSM_SVR1>: admin
Please enter password for user id "ADMIN":
Session established with server TSM_SVR1: Linux/i386
Server Version 5, Release 5, Level 1.0
Server date/time: 06/16/2011 17:08:34 Last access: 06/16/2011 17:05:45
Directory--> 4,096 /root [Sent]
Directory--> 4,096 /root/test [Sent]
Directory--> 4,096 /root/test/shp [Sent]
Normal File--> 0 /root/test/f1 [Sent]
Normal File--> 78 /root/test/file [Sent]
Normal File--> 41 /root/test/shp/er [Sent]
ANS1114I Waiting for mount of offline media.
Retry # 1 Directory--> 4,096 /root [Sent]
Retry # 1 Directory--> 4,096 /root/test [Sent]
Retry # 1 Directory--> 4,096 /root/test/shp [Sent]
Retry # 1 Normal File--> 0 /root/test/f1 [Sent]
Retry # 1 Normal File--> 78 /root/test/file [Sent]
Retry # 1 Normal File--> 41 /root/test/shp/er [Sent]
< 1.28 KB> [- ]
< 1.28 KB> [ - ]
< 1.28< 1.28 KB> [ -]
发现总是卡在不动,没有办法;
重新开个窗口,q actlog begindate=06/15/2011
发现:
06/16/2011 17:16:39 ANR8308I 001: LTO volume SS0002 is required for use in
library VTL02; CHECKIN LIBVOLUME required within 52
minutes.
是以前一个ss0003 么有被label 的磁带放到spool 了:(注明是ar_tape_spool)
tsm: TSM_SVR1>q v
Volume Name Storage Device Estimated Pct Volume
Pool Name Class Name Capacity Util Status
------------------------ ----------- ---------- --------- ----- --------
/opt/tivoli/tsm/server/- ARCHIVEPOOL DISK 5.0 M 0.0 On-Line
bin/archive.dsm
/opt/tivoli/tsm/server/- BACKUPPOOL DISK 10.0 M 0.0 On-Line
bin/backup.dsm
CC00003 BA_TAPE_PO- LTO2 0.0 M 0.0 Empty
OL
SS0002 AR_TAPE_PO- LTO3 0.0 M 0.0 Empty
OL
TT0001 BA_TAPE_PO- LTO2 0.0 M 0.0 Empty
OL
TT0002 BA_TAPE_PO- LTO2 0.0 M 0.0 Empty
OL
XX0009 AR_TAPE_PO- LTO3 0.0 M 0.0 Empty
OL
XX0010 BA_TAPE_PO- LTO2 0.0 M 0.0 Empty
OL
好,下面把 ss0002 给delete,
tsm: TSM_SVR1>delete volume ss0002
ANR2220W This command will delete volume SS0002 from its storage pool after verifying that the
volume contains no data.
Do you wish to proceed? (Yes (Y)/No (N)) yes
tsm: TSM_SVR1>q v
Volume Name Storage Device Estimated Pct Volume
Pool Name Class Name Capacity Util Status
------------------------ ----------- ---------- --------- ----- --------
/opt/tivoli/tsm/server/- ARCHIVEPOOL DISK 5.0 M 0.0 On-Line
bin/archive.dsm
/opt/tivoli/tsm/server/- BACKUPPOOL DISK 10.0 M 0.0 On-Line
bin/backup.dsm
CC00003 BA_TAPE_PO- LTO2 0.0 M 0.0 Empty
OL
TT0001 BA_TAPE_PO- LTO2 0.0 M 0.0 Empty
OL
TT0002 BA_TAPE_PO- LTO2 0.0 M 0.0 Empty
OL
XX0009 AR_TAPE_PO- LTO3 0.0 M 0.0 Empty
OL
XX0010 BA_TAPE_PO- LTO2 0.0 M 0.0 Empty
OL
tsm: TSM_SVR1>
好,下面进行备份:
root@sheng bin]# ./dsmc archive /root/test/ -subdir=yes
IBM Tivoli Storage Manager
Command Line Backup/Archive Client Interface
Client Version 5, Release 5, Level 1.0
Client date/time: 06/16/2011 18:04:02
(c) Copyright by IBM Corporation and other(s) 1990, 2008. All Rights Reserved.
Archive function invoked.
Node Name: TSM_SVR1
Please enter your user id <TSM_SVR1>: admin
Please enter password for user id "ADMIN":
Session established with server TSM_SVR1: Linux/i386
Server Version 5, Release 5, Level 1.0
Server date/time: 06/16/2011 18:04:02 Last access: 06/16/2011 18:02:30
Directory--> 4,096 /root [Sent]
Directory--> 4,096 /root/test [Sent]
Directory--> 4,096 /root/test/shp [Sent]
Normal File--> 0 /root/test/f1 [Sent]
Normal File--> 78 /root/test/file [Sent]
Normal File--> 41 /root/test/shp/er [Sent]
ANS1114I Waiting for mount of offline media.
Retry # 1 Directory--> 4,096 /root [Sent]
Retry # 1 Directory--> 4,096 /root/test [Sent]
Retry # 1 Directory--> 4,096 /root/test/shp [Sent]
Retry # 1 Normal File--> 0 /root/test/f1 [Sent]
Retry # 1 Normal File--> 78 /root/test/file [Sent]
Retry # 1 Normal File--> 41 /root/test/shp/er [Sent]
Archive processing of '/root/test/*' finished without failure.
Total number of objects inspected: 6
Total number of objects archived: 6
Total number of objects updated: 0
Total number of objects rebound: 0
Total number of objects deleted: 0
Total number of objects expired: 0
Total number of objects failed: 0
Total number of bytes transferred: 1.28 KB
Data transfer time: 0.00 sec
Network data transfer rate: 4,022.58 KB/sec
Aggregate data transfer rate: 0.62 KB/sec
Objects compressed by: 0%
Elapsed processing time: 00:00:02
[root@sheng bin]#
应该是成功了,好,下面看一下log:
没有发现啥异常:
objects rebound: 0 (SESSION: 2)
06/16/2011 18:04:09 ANE4957I (Session: 2, Node: TSM_SVR1) Total number of
objects deleted: 0 (SESSION: 2)
06/16/2011 18:04:09 ANE4970I (Session: 2, Node: TSM_SVR1) Total number of
objects expired: 0 (SESSION: 2)
06/16/2011 18:04:09 ANE4959I (Session: 2, Node: TSM_SVR1) Total number of
objects failed: 0 (SESSION: 2)
06/16/2011 18:04:09 ANE4961I (Session: 2, Node: TSM_SVR1) Total number of
bytes transferred: 1.28 KB (SESSION: 2)
06/16/2011 18:04:09 ANE4963I (Session: 2, Node: TSM_SVR1) Data transfer time:
0.00 sec (SESSION: 2)
06/16/2011 18:04:09 ANE4966I (Session: 2, Node: TSM_SVR1) Network data
transfer rate: 4,022.58 KB/sec (SESSION: 2)
06/16/2011 18:04:09 ANE4967I (Session: 2, Node: TSM_SVR1) Aggregate data
transfer rate: 0.62 KB/sec (SESSION: 2)
06/16/2011 18:04:09 ANE4968I (Session: 2, Node: TSM_SVR1) Objects compressed
by: 0% (SESSION: 2)
06/16/2011 18:04:09 ANE4964I (Session: 2, Node: TSM_SVR1) Elapsed processing
time: 00:00:02 (SESSION: 2)
06/16/2011 18:04:09 ANR0403I Session 2 ended for node TSM_SVR1 (Linux86).
在看一下tape:
tsm: TSM_SVR1>q v
Volume Name Storage Device Estimated Pct Volume
Pool Name Class Name Capacity Util Status
------------------------ ----------- ---------- --------- ----- --------
/opt/tivoli/tsm/server/- ARCHIVEPOOL DISK 5.0 M 0.0 On-Line
bin/archive.dsm
/opt/tivoli/tsm/server/- BACKUPPOOL DISK 10.0 M 0.0 On-Line
bin/backup.dsm
CC00003 BA_TAPE_PO- LTO2 0.0 M 0.0 Empty
OL
TT0001 BA_TAPE_PO- LTO2 0.0 M 0.0 Empty
OL
TT0002 BA_TAPE_PO- LTO2 0.0 M 0.0 Empty
OL
XX0009 AR_TAPE_PO- LTO3 1.0 G 0.0 Filling
OL
XX0010 BA_TAPE_PO- LTO2 0.0 M 0.0 Empty
OL
status 是filling :
tsm: TSM_SVR1>q libv
Library Name Volume Name Status Owner Last Use Home Device
Element Type
------------ ----------- ---------------- ---------- --------- ------- ------
VTL02 XX0001 Scratch 1
VTL02 XX0002 Scratch 2
VTL02 XX0003 Scratch 3
VTL02 XX0004 Scratch 4
VTL02 XX0005 Scratch 5
VTL02 XX0006 Scratch 6
VTL02 XX0007 Scratch 7
VTL02 XX0008 Scratch 8
VTL02 XX0009 Private Data 9
VTL02 XX0010 Scratch 10
tsm: TSM_SVR1>
符合我的预期。
好下面来做 恢复:
[root@sheng bin]# cd /root/test
[root@sheng test]# ls -l
total 20
-rw-r--r-- 1 root root 0 Jun 12 08:29 f1
-rw-r--r-- 1 root root 78 Jun 16 15:59 file
drwxr-xr-x 2 root root 4096 Jun 16 16:30 shp
[root@sheng test]# rm -rf *
[root@sheng test]# ls -l
total 0
进行恢复:
[root@sheng bin]# ./dsmc restore /root/test/ -subdir=yes
IBM Tivoli Storage Manager
Command Line Backup/Archive Client Interface
Client Version 5, Release 5, Level 1.0
Client date/time: 06/16/2011 18:36:00
(c) Copyright by IBM Corporation and other(s) 1990, 2008. All Rights Reserved.
Node Name: TSM_SVR1
Please enter your user id <TSM_SVR1>: admin
Please enter password for user id "ADMIN":
Session established with server TSM_SVR1: Linux/i386
Server Version 5, Release 5, Level 1.0
Server date/time: 06/16/2011 18:36:00 Last access: 06/16/2011 18:27:20
Restore function invoked.
ANS1247I Waiting for files from the server...
ANS1302E No objects on server match query
报错,
以后继续研究...
后来发现是archive 的恢复,不是 restore, 而是: retrieve
[root@sheng bin]# ./dsmc retrieve /root/test/ -subdir=yes
IBM Tivoli Storage Manager
Command Line Backup/Archive Client Interface
Client Version 5, Release 5, Level 1.0
Client date/time: 06/16/2011 22:18:05
(c) Copyright by IBM Corporation and other(s) 1990, 2008. All Rights Reserved.
Retrieve function invoked.
Node Name: TSM_SVR1
Please enter your user id <TSM_SVR1>: admin
Please enter password for user id "ADMIN":
Session established with server TSM_SVR1: Linux/i386
Server Version 5, Release 5, Level 1.0
Server date/time: 06/16/2011 22:18:05 Last access: 06/16/2011 22:07:24
** Interrupted **
ANS1114I Waiting for mount of offline media.
Retrieving 4,096 /root/test/shp [Done]
Retrieving 0 /root/test/f1 [Done]
Retrieving 78 /root/test/file [Done]
Retrieving 41 /root/test/shp/er [Done]
Retrieve processing finished.
Total number of objects retrieved: 4
Total number of objects failed: 0
Total number of bytes transferred: 481 B
Data transfer time: 0.00 sec
Network data transfer rate: 4,892.98 KB/sec
Aggregate data transfer rate: 0.15 KB/sec
Elapsed processing time: 00:00:03
恢复成功。