互联网服务TSMinclude

tsm include 使用测试小记

定义:
define domain file_domain backretention=90 archretention=365
define policyset file_domain file_policyset
define mgmtclass file_domain file_policyset file_mgmt
define mgmtclass file_domain file_policyset file02_mgmt
define copygroup file_domain file_policyset file_mgmt standard type=backup destination=file01stg verexists=2 verdelete=1 retextra=30 retonly=60 mode=modified
define copygroup file_domain file_policyset fil02_mgmt standard type=backup destination=file02stg verexists=2 verdelete=1 retextra=30 retonly=60 mode=modified
assign defmgmtclass file_domain file_policyset file_mgmt
activate policyset file_domain file_policyset



register node tsmserv admin domain=file_domain compression=client archdelete=yes backdelete=yes type=client passexp=9999



指定file01_mgmt 为默认缺省管理类,激活
指定file02_mgmt 为默认缺省管理类,激活



assign defmgmtclass file_domain file_policyset file02_mgmt

activate policyset file_domain file_policyset



管理类只有在首先指定为缺省管理类,才可以激活,所以如果想让策略集的管理类都激活,则必须都首先指定为缺省管理类,然后在激活

tsm: TSMSERVER>q mgmt

Policy        Policy        Mgmt          Default       Description            
Domain        Set Name      Class         Mgmt         
Name                        Name          Class ?      
---------     ---------     ---------     ---------     ------------------------
EXCHANGE-     ACTIVE        EXCHANGE-     Yes                                   
_DOMAIN                     _MGMT                                             
EXCHANGE-     EXCHANGE-     EXCHANGE-     Yes                                   
_DOMAIN       _POLICY-      _MGMT                                             
               SET                                                              
FILE_DOM-     ACTIVE        FILE02_M-     Yes                                   
AIN                         GMT                                                
FILE_DOM-     ACTIVE        FILE_MGMT     No                                    
AIN                                                                           
FILE_DOM-     FILE_POL-     FILE02_M-     Yes                                   
AIN           ICYSET        GMT                                                
FILE_DOM-     FILE_POL-     FILE_MGMT     No                                    
AIN           ICYSET                                                           
STANDARD      ACTIVE        STANDARD      Yes           Installed default      
                                                         management class.      
STANDARD      STANDARD      STANDARD      Yes           Installed default      
                                                         management class.













[root@tsmserver bin]# cat dsm.sys
************************************************************************
* Tivoli Storage Manager                                               *
*                                                                      *
* Sample Client System Options file for UNIX (dsm.sys.smp)             *
************************************************************************

*  This file contains the minimum options required to get started
*  using TSM.  Copy dsm.sys.smp to dsm.sys.  In the dsm.sys file,
*  enter the appropriate values for each option listed below and
*  remove the leading asterisk (*) for each one.

*  If your client node communicates with multiple TSM servers, be
*  sure to add a stanza, beginning with the SERVERNAME option, for
*  each additional server.

************************************************************************

SErvername  tsmserver
   COMMMethod         TCPip
   TCPPort            1500
   TCPServeraddress   10.1.254.173


nodename    tsmserv
*exclude /tsmbak/services
*include /tsmbak/jh.jar  FILE_MGMT


tsm: TSMSERVER>q mgmt

Policy        Policy        Mgmt          Default       Description            
Domain        Set Name      Class         Mgmt         
Name                        Name          Class ?      
---------     ---------     ---------     ---------     ------------------------
EXCHANGE-     ACTIVE        EXCHANGE-     Yes                                   
_DOMAIN                     _MGMT                                             
EXCHANGE-     EXCHANGE-     EXCHANGE-     Yes                                   
_DOMAIN       _POLICY-      _MGMT                                             
               SET                                                              
FILE_DOM-     ACTIVE        FILE02_M-     Yes                                   
AIN                         GMT                                                
FILE_DOM-     ACTIVE        FILE_MGMT     No                                    
AIN                                                                           
FILE_DOM-     FILE_POL-     FILE02_M-     Yes                                   
AIN           ICYSET        GMT                                                
FILE_DOM-     FILE_POL-     FILE_MGMT     No                                    
AIN           ICYSET                                                           
STANDARD      ACTIVE        STANDARD      Yes           Installed default      
                                                         management class.      
STANDARD      STANDARD      STANDARD      Yes           Installed default      
                                                         management class.      




[root@tsmserver bin]# dsmc selective /tsmbak/* -subdir=yes
IBM Tivoli Storage Manager
Command Line Backup-Archive Client Interface
  Client Version 6, Release 3, Level 0.0  
  Client date/time: 07/12/2014 01:39:16
(c) Copyright by IBM Corporation and other(s) 1990, 2011. All Rights Reserved.

Node Name: TSMSERV
Please enter your user id :

Please enter password for user id "TSMSERV":

Session established with server TSMSERVER: Linux/x86_64
  Server Version 6, Release 3, Level 4.0
  Server date/time: 07/12/2014 01:39:16  Last access: 07/12/2014 01:36:42

Selective Backup function invoked.

Directory-->               4,096 /tsmbak [Sent]      
Normal File-->           641,120 /tsmbak/services [Sent]      
Selective Backup processing of '/tsmbak/services' finished without failure.

Directory-->               4,096 /tsmbak [Sent]      
Normal File-->           349,114 /tsmbak/jh.jar [Sent]      
Selective Backup processing of '/tsmbak/jh.jar' finished without failure.


Total number of objects inspected:            4
Total number of objects backed up:            4
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 inspected:         975.02 KB
Total number of bytes transferred:       967.42 KB
Data transfer time:                        0.17 sec
Network data transfer rate:            5,603.74 KB/sec
Aggregate data transfer rate:            268.97 KB/sec
Objects compressed by:                        0%
Total data reduction ratio:                0.78%
Elapsed processing time:               00:00:03



tsm: TSMSERVER>q vol                                    

Volume Name                  Storage         Device         Estimated       Pct      Volume
                             Pool Name       Class Name      Capacity      Util      Status
------------------------     -----------     ----------     ---------     -----     --------
/tsmbackup/file/0000000-     EXCHANGEPO-     FILECLASS         78.1 G      19.6     Filling
4.BFS                        OL                                                            
/tsmbackup/file/0000000-     EXCHANGEPO-     FILECLASS         78.1 G       1.0     Filling
5.BFS                        OL                                                            
/tsmbackup/file01/file0-     FILE01STG       FILEDEV01      1,000.0 M       0.0      Empty  
1_vol01                                                                                    
/tsmbackup/file02/file0-     FILE02STG       FILEDEV02      1,000.0 M       0.1     Filling
2_vol01                                                                                    

tsm: TSMSERVER>q content /tsmbackup/file02/file02_vol01

Node Name           Type     Filespace      FSID     Client's Name for File               
                             Name                    
---------------     ----     ----------     ----     --------------------------------------
TSMSERV             Bkup     /                16     /tsmbak/services                     
TSMSERV             Bkup     /                16     /tsmbak/jh.jar  




默认备份到file02_mgmt 所对应的存储正常:








修改dsm.sys


[root@tsmserver bin]# cat dsm.sys
************************************************************************
* Tivoli Storage Manager                                               *
*                                                                      *
* Sample Client System Options file for UNIX (dsm.sys.smp)             *
************************************************************************

*  This file contains the minimum options required to get started
*  using TSM.  Copy dsm.sys.smp to dsm.sys.  In the dsm.sys file,
*  enter the appropriate values for each option listed below and
*  remove the leading asterisk (*) for each one.

*  If your client node communicates with multiple TSM servers, be
*  sure to add a stanza, beginning with the SERVERNAME option, for
*  each additional server.

************************************************************************

SErvername  tsmserver
   COMMMethod         TCPip
   TCPPort            1500
   TCPServeraddress   10.1.254.173


nodename    tsmserv
include /tsmbak/jh.jar  FILE_MGMT





[root@tsmserver bin]# dsmc selective /tsmbak/* -subdir=yes
IBM Tivoli Storage Manager
Command Line Backup-Archive Client Interface
  Client Version 6, Release 3, Level 0.0  
  Client date/time: 07/12/2014 01:43:45
(c) Copyright by IBM Corporation and other(s) 1990, 2011. All Rights Reserved.

Node Name: TSMSERV
Please enter your user id :

Please enter password for user id "TSMSERV":

Session established with server TSMSERVER: Linux/x86_64
  Server Version 6, Release 3, Level 4.0
  Server date/time: 07/12/2014 01:43:45  Last access: 07/12/2014 01:39:22

Selective Backup function invoked.

Directory-->               4,096 /tsmbak [Sent]      
Normal File-->           641,120 /tsmbak/services [Sent]      
Selective Backup processing of '/tsmbak/services' finished without failure.

Directory-->               4,096 /tsmbak [Sent]      
Normal File-->           349,114 /tsmbak/jh.jar [Sent]      
Selective Backup processing of '/tsmbak/jh.jar' finished without failure.


Total number of objects inspected:            4
Total number of objects backed up:            4
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 inspected:         975.02 KB
Total number of bytes transferred:       967.42 KB
Data transfer time:                        0.08 sec
Network data transfer rate:           12,072.64 KB/sec
Aggregate data transfer rate:            285.39 KB/sec
Objects compressed by:                        0%
Total data reduction ratio:                0.78%
Elapsed processing time:               00:00:03




tsm: TSMSERVER>q vol

Volume Name                  Storage         Device         Estimated       Pct      Volume
                             Pool Name       Class Name      Capacity      Util      Status
------------------------     -----------     ----------     ---------     -----     --------
/tsmbackup/file/0000000-     EXCHANGEPO-     FILECLASS         78.1 G      19.6     Filling
4.BFS                        OL                                                            
/tsmbackup/file/0000000-     EXCHANGEPO-     FILECLASS         78.1 G       1.0     Filling
5.BFS                        OL                                                            
/tsmbackup/file01/file0-     FILE01STG       FILEDEV01      1,000.0 M       0.0     Filling
1_vol01                                                                                    
/tsmbackup/file02/file0-     FILE02STG       FILEDEV02      1,000.0 M       0.1     Filling
2_vol01                                                                                    



验证结果:


可以看到绑定设备类的文件备份到了指定存储池file01stg,没有绑定管理类的备份至缺省存储池file02stg




tsm: TSMSERVER>q content /tsmbackup/file01/file01_vol01

Node Name           Type     Filespace      FSID     Client's Name for File               
                             Name                    
---------------     ----     ----------     ----     --------------------------------------
TSMSERV             Bkup     /                17     /tsmbak/jh.jar



tsm: TSMSERVER>q content /tsmbackup/file02/file02_vol01

Node Name           Type     Filespace      FSID     Client's Name for File               
                             Name                    
---------------     ----     ----------     ----     --------------------------------------
TSMSERV             Bkup     /                17     /tsmbak/services  









如果在dsm.sys 文件里指定

[root@tsmserver bin]# cat dsm.sys


SErvername  tsmserver
   COMMMethod         TCPip
   TCPPort            1500
   TCPServeraddress   10.1.254.173


nodename    tsmserv
include /tsmbak/jh.jar  FILE_MGMT




但是备份时指定目录不对,如:

root@tsmserver bin]# dsmc selective /etc/ -subdir=yes


则备份的文件会分别存储两个存储池当中:

tsm: TSMSERVER>q vol

Volume Name                  Storage         Device         Estimated       Pct      Volume
                             Pool Name       Class Name      Capacity      Util      Status
------------------------     -----------     ----------     ---------     -----     --------
/tsmbackup/file/0000000-     EXCHANGEPO-     FILECLASS         78.1 G      19.6     Filling
4.BFS                        OL                                                            
/tsmbackup/file/0000000-     EXCHANGEPO-     FILECLASS         78.1 G       1.0     Filling
5.BFS                        OL                                                            
/tsmbackup/file01/file0-     FILE01STG       FILEDEV01      1,000.0 M       0.0     Filling
1_vol01                                                                                    
/tsmbackup/file02/file0-     FILE02STG       FILEDEV02      1,000.0 M       2.1     Filling
2_vol01                                                                                    





tsm: TSMSERVER>q content /tsmbackup/file02/file02_vol01

Node Name           Type     Filespace      FSID     Client's Name for File               
                             Name                    
---------------     ----     ----------     ----     --------------------------------------
TSMSERV             Bkup     /                23     /etc/rc3.d                           
TSMSERV             Bkup     /                23     /etc/gshadow-                        
TSMSERV             Bkup     /                23     /etc/aliases                          
TSMSERV             Bkup     /                23     /etc/environment                     
TSMSERV             Bkup     /                23     /etc/redhat-release                  
TSMSERV             Bkup     /                23     /etc/passwd                           
TSMSERV             Bkup     /                23     /etc/printcap                        
TSMSERV             Bkup     /                23     /etc/rc6.d                           
TSMSERV             Bkup     /                23     /etc/login.defs                       
TSMSERV             Bkup     /                23     /etc/ld.so.cache                     
TSMSERV             Bkup     /                23     /etc/inputrc                          
TSMSERV             Bkup     /                23     /etc/inittab                          
TSMSERV             Bkup     /                23     /etc/fstab                           
TSMSERV             Bkup     /                23     /etc/nsswitch.conf                    
TSMSERV             Bkup     /                23     /etc/mtab      



tsm: TSMSERVER>q content /tsmbackup/file01/file01_vol01

Node Name           Type     Filespace      FSID     Client's Name for File               
                             Name                    
---------------     ----     ----------     ----     --------------------------------------
TSMSERV             Bkup     /                23     /etc                                 
TSMSERV             Bkup     /                23     /etc/ConsoleKit                       
TSMSERV             Bkup     /                23     /etc/NetworkManager                  
TSMSERV             Bkup     /                23     /etc/X11                              
TSMSERV             Bkup     /                23     /etc/alternatives                     
TSMSERV             Bkup     /                23     /etc/audisp                           
TSMSERV             Bkup     /                23     /etc/audit                           
TSMSERV             Bkup     /                23     /etc/avahi                           
TSMSERV             Bkup     /                23     /etc/bash_completion.d               
TSMSERV             Bkup     /                23     /etc/blkid                           
TSMSERV             Bkup     /                23     /etc/bonobo-activation               
TSMSERV             Bkup     /                23     /etc/chkconfig.d                     
TSMSERV             Bkup     /                23     /etc/cron.d                           
TSMSERV             Bkup     /                23     /etc/cron.daily                       
TSMSERV             Bkup     /                23     /etc/cron.hourly   




结论:

1. 使用include 语句绑定管理类时,备份语句中一定要包含include 指定的文件,否则include文件不生效。
2. 如果策略集有两个管理类,且都是激活状态,且在客户单dsm.sys文件里 没有使用include绑定管理,或者在和备份时指定的目录不包括 使用include绑定管理类指定目录或文件,则备份的文件会备份至不同的存储池,都有内容
参与2

1同行回答

mytxymytxy系统工程师某某互联网公司
辛苦楼主了显示全部
辛苦楼主了收起
互联网服务 · 2015-03-06
浏览1954

提问者

powertiandi
系统架构师李宁(中国)体育用品有限公司
擅长领域: 存储服务器灾备

相关问题

相关资料

问题状态

  • 发布时间:2014-11-06
  • 关注会员:1 人
  • 问题浏览:4579
  • 最近回答:2015-03-06
  • X社区推广