IBM TSM備份軟體的安裝方法

zhengbao_jun發表於2010-11-03

備份軟體:Tivoli
Tivoli storage manage
Tivoli Storage Manager功能描述
TSM技術引數
TSM版本:  5.1
TSM5.1 伺服器軟體的執行平臺: IBM AIX 4.3.2, 4.3.3.,5l Sun Solaris 2.6, 7, 8. HP-UX 11.0.  Microsoft Windows NT/2000 Workstation 或Server Version 4.0, SP3, SP4, SP5, SP6 或 SP6a.
TSM客戶端軟體: 支援幾乎所有流行的作業系統平臺.如IBM的所有作業系統, Windows, Apple, Novell, DEC, HP, SUN, SCO, SGI, Linux 等.
Tivoli Data Protection for Oracle 2.2: 實現對Oracle 資料庫的線上備份和恢復。
Oracle伺服器可執行在的平臺包括 Windows NT/2000, AIX, HP-UX, Solaris。


  Tivoli TSM產品功能詳述
Tivoli TSM(Tivoli Storage Manager)是一個企業級的Client/Server結構跨平臺網路備份、恢復及儲存管理軟體。TSM Client主要功能是向TSM Server提供需要備份的資料,或向TSM Server索取已備份資料及歸檔資料以便Client恢復資料。TSM Server負責管理TSM Client的備份資料、備份策略及管理連線在TSM Server上的各類儲存產品。
  TSM自動備份和恢復
        一旦整個備份系統設定完成,每個應用系統的伺服器會在指定的時間把需要備份的資料送到TSM伺服器中集中存放。如果需要恢復資料,TSM Client端只要通過非常簡單易用的圖形介面或由應用程式發出指令指出恢復哪些個物件檔案,TSM Server自動從磁帶庫中取出檔案,交給TSM Client。如果備份磁帶不在磁帶庫中,TSM Server提示系統管理員插入某盒磁帶。
        TSM是一個徹底的線上備份軟體。對資料庫,TSM通過TSM Connect Agent備份正在開啟的資料庫。對一般檔案系統的檔案,TSM的Client端能夠備份開啟的檔案,甚至能備份正被修改的檔案。當備份TSM遇到需備份的檔案正被改動時,有四種處理方式:
不備份,同時在日誌中留一個標記;
馬上備份
重試數次(次數由使用者預定),如檔案仍然在修改,則不備份,記日誌;
重試數次(次數由使用者預先指定),最後一次無論檔案靜止或仍然在改動,都備份該檔案。

TSM比同類備份軟體考慮的更多的是資料的恢復能力。TSM的觀念是:備份的目的就是恢復。所以在備份軟體的評測中,備份速度TSM的優勢並不明顯,而恢復速度往往是其他軟體的數倍。
        TSM這種驚人的恢復速度及其他許多獨一無二的功能主要依賴於TSM強大的核心,TSM的引擎是一個關聯式資料庫。迄今沒有任何一家其他備份軟體是採用關係型資料庫作核心的。關聯式資料庫的處理能力和搜尋速度是TSM效能超越其他採用索引檔案作為引擎的備份軟體的主要原因。TSM完善的介質管理能力也得益於這個資料庫引擎。
  TSM備份和恢復過程的容錯性
TSM是唯一採用資料庫作為核心的備份管理軟體,每個備份物件都作為一個交易(Transaction)來處理。因此TSM具有很強的容錯能力,TSM的傳輸資料原則是:儘量避免不必要的重複資料傳送佔用網路頻寬。當某個備份或恢復過程因為網路中斷或機器故障而意外終止,下次重新遞交該備份或恢復程式時,TSM會從中斷處繼續傳輸,而不是從頭開始(許多備份軟體都必須從頭開始重做)。原因是TSM對每個物件備份完成與否都有日誌記錄,就象銀行系統對每筆交易完成與否都有記錄一樣。
TSM的永遠增量備份
TSM支援全盤備份和獨一無二的“永久增量備份”方式。永久增量備份是指:初始時做所有資料檔案的全盤備份,以後只備份新的或改動過的檔案。這種方式減少了備份時間和所需的儲存容量,減輕了網路負擔。這種方式的原因是TSM把每個備份物件作為一個交易,記錄在它的關聯式資料庫中,每個備份物件對應檔案系統的一個檔案。當使用者需要恢復檔案系統時,TSM找到所有屬於該檔案系統原備份物件,交給使用者。所以,TSM能夠做永遠的增量備份。
TSM的介質管理能力       
TSM對備份和歸檔資料分別管理。因為歸檔資料儲存時間比備份資料長,而且備份資料有‘版本’,歸檔資料無版本。‘版本’就是同一個資料物件的多個備份copy,例如,記錄銷售情況的檔案每天都在改變,如果每天做備份,那麼每天的備份就是一個‘版本’。使用者可以根據實際業務需要,保留必要的‘版本’數。TSM能夠自動清除過期的備份版本和歸檔資料。
TSM在介質管理中採用了獨一無二的“磁帶集中”和“磁帶重用”技術。“磁帶集中”使每個客戶機的每天的備份資料都對應放在一盒或一組磁帶上,使得TSM能夠用最少的磁帶數做恢復。這是一種迅速、可靠的資料恢復方式。
“磁帶重用”的目的是使磁帶庫或光碟庫介質自動輪轉,完全實現備份、恢復的無人值守。原理是:當介質上的過期資料越來越多並達到一定限度時,比如介質上80%的資料都過期了,TSM會自動把數個這樣的介質的殘餘資料整合到一個介質中,而其它介質重新進入新的介質輪轉中去。所以,如果使用者有足夠的儲存容量,TSM可以做到真正的‘零管理’。
TSM能夠自動跟蹤所有介質的去向和使用情況。TSM不僅自動管理磁帶庫、光碟庫中的介質,還能跟蹤放在磁帶庫、光碟庫外的介質和保留在異地的備份介質。當恢復需要這些介質時,TSM會提示管理員到何處去取標籤為xxx的介質。
TSM本身具有完善的自我保護和恢復機制。配合TSM的災難恢復,可幫助使用者在計算機系統發生災難性事件後迅速恢復系統和資料。這在後面有更詳細的說明。
資料庫備份的考慮:       
資料庫的備份主要考慮備份是線上熱備份還是冷備份。資料庫的儲存空間是建立在檔案系統還是裸裝置上。
建立在裸裝置上的檔案無法通過作業系統的檔案系統來訪問,而大部分應用程式包括TSM都是通過檔案系統來訪問資料的。資料庫熱備份是在資料庫開啟的情況下做的,所以在備份前一定要保證資料據庫的完整性。失去完整性的資料庫是無法恢復的。冷備份是在資料庫正常關閉後做的備份,所以不需要考慮完整性(資料庫已經是完整的)。
如果資料庫存放在檔案系統中,又只要做冷備份。非常簡單,使用TSM的Client自動備份(或使用者選定)相關檔案即可。備份Oracle就採用這種辦法。同樣,如果Informix和Sybase基於檔案系統,需做冷備份也採用這種方式。
如果做冷備份的資料庫基於裸裝置,或者需要熱備份,則需要資料庫工具來實現, TSM提供對以下應用的線上備份能力:
Lotus Domino、DB2、Oracle、Informix、SAP R/3、Exchange、SQL Server等
而且,Tivoli提供對應用的備份將可以充分利用到Tivoli對SAN的支援,應用可以支援通過SAN進行線上備份和恢復。

災難恢復功能
TSM的Disaster Recovery Management(DRM) 選件能夠幫助使用者迅速恢復系統。
優點:
在各類災難恢復方案中,是最全面及簡單易行的方案之一
災難發生後能夠全自動恢復TSM伺服器
自動生成可執行描述檔案,準確、迅速恢復TSM伺服器
為系統級的災難恢復提供所需資訊及步驟的詳細描述
管理和跟蹤TSM資料庫和儲存區間備份卷,智慧化減少人為錯誤
為PC機的硬碟提供物理級映象式恢復
大幅度減少系統管理員在容災方面的時間投入
詳細地指導操作人員如何一步一步恢復系統

好的計劃是容災的關鍵
許多企業機構都認識到資料備份是保證業務正常持續執行的重要部分。如果缺少了正確的資料保護,那麼裝置的故障、人為錯誤或自然災害都會導致關鍵任務資料的丟失。但是,資料保護工作卻變的越來越複雜,原因是關鍵性資料的儲存越來越分散,資料分佈在不同的地理位置或不同的組織部門中。
即使已經做了安全守護措施,那麼當災難發生後,在一個大型組織中需要多少時間才能徹底恢復資料呢?
答案取決於多種因素。災難發生前,備份是否不折不扣的執行;如果日常有資訊系統的恢復計劃存在,該計劃是否始終保持更新;如何在災後迅速找到所有本地或異地的備份資料;如果災難摧毀了伺服器和工作站,那麼這些裝置的軟硬體配置環境必須能夠重新建立起來。
在很多情形中,實施恢復任務的工作小組往往不熟悉整個企業計算環境的結構,因為他們並沒有參與當時結構的設計和初始化安裝設定。
在災難發生後的混亂中,管理員很難做到周全安排、井井有條的恢復系統及資料。因此,他們需要一份無懈可擊、條理清晰的恢復指導書,TSM的災難管理功能(簡稱DRM)能夠指導使用者如何操作來迅速恢復企業範圍內的各種資料。
DRM管理自動恢復所需的每個細節
自動、準確的DRM功能幫助使用者保護寶貴資料的安全性。在TSM管轄內的資料,都能通過DRM自動策劃、準備及製作備份恢復計劃,一旦DRM生成了計劃檔案,所有伺服器上最新的相關資訊都被收集起來,以備恢復。
如果災難發生,DRM提供恢復步驟的詳細文件,可執行的描述檔案自動恢復資料、重建環境。DRM使得企業可以很快回復正常運轉。
DRM智慧化管理和跟蹤備份介質的轉移。幫助管理員決定哪些介質本地儲存,哪些介質需要異地儲存。當恢復災難時,DRM幫助使用者迅速找到所有需要的介質,無論這些介質是在本地或運輸途中或在異地的保險櫃裡。
TSM客戶端追蹤管理功能幫助系統管理員瞭解哪些系統被災害摧毀,以及這些機器所需要的軟硬體,以便使用者決定需要重新定購哪些裝置來替換損壞的裝置。
其他DRM記錄的重要資訊包括:需要恢復的各臺機器的優先順序;相關人員的連續方式等
DRM簡化了計劃和稽查過程
DRM自動收集制定恢復計劃所需要的資訊,並自動執行災難恢復過程中的一些重要步驟,從而節省了系統管理員大量的時間。
許多機構需要定期測試容災方案以確定其可行性,DRM集中式的管理和維護便於檢查,而DRM清晰的步驟使得無論是全域性測試或區域性測試都簡單易行。
DRM特性/功能/價值對照表

特性        功能        價值
全面的企業儲存管理解決方案        支援25個以上的多供應商平臺以及許多應用程式和資料庫        提供一個單一、全面、易於使用的儲存管理解決方案,保護您的分散式、異構型關鍵任務資料。
多個TSM伺服器的集中管理        允許管理員集中管理多個Tivoli TSM伺服器;在一個Tivoli TSM伺服器集中定義公用策略和配置資訊,然後將它們傳播到其他Tivoli TSM伺服器。        提高管理員生產率,降低資訊科技總成本和工作負荷。
自動化和排程的儲存管理操作        使備份、存檔、分層儲存管理和災難恢復自動化-消除了易於出錯的人工操作。        消除人工備份和跟蹤需求;為保護您的關鍵任務資料提高一個自動化、高效能解決方案。
關鍵記錄保留(存檔)        擁有關鍵記錄保留的存檔功能,以及一個從Tivoli TSM快速搜尋和檢索關鍵記錄的簡單GUI。        能使您滿足審計和法規需求。
分層儲存管理(HSM)        自動將不經常被存取的資料從昂貴的磁碟儲存遷移到更加經濟的介質,例如Tivoli TSM伺服器上的磁帶和光碟儲存。        通過使現有儲存資源最大化幫助降低成本,並減少升級磁碟儲存的需求。
災難恢復管理器(DRM)        為每一個Tivoli TSM伺服器生成一個逐步奏的災難恢復計劃。        通過減少在發生故障或自然災難之後恢復系統的時間,確保業務連續性。

DRM現在支援作業系統有:AIX、AS/400、HP-UX、MVS、Windows NT和Sun Solaris。       
  TSM的擴充套件能力
        TSM是一個真正企業級的軟體。體現在單個TSM伺服器的穩定和成熟,支援的平臺、裝置非常廣泛,還體現在多個TSM之間的互聯和統一管理上。
        當某個TSM伺服器因為TSM Client增長過快,伺服器負荷太重時,可以把一部分使用者和他們的資料遷移到另一臺TSM伺服器中。這兩臺伺服器可以是不同的平臺。
        TSM的Server to Server Communication選件使TSM伺服器之間能夠互相傳遞資料,相互備份等功能。

一、TSM軟體安裝
1.TSM Server軟體的安裝
A、以root使用者登陸
B、通過#smitty installp進行軟體的安裝
選擇相應的軟體包進行安裝:Tivoli.tsm.server.rte 、Tivoli.tsm.server.com 、Tivoli.tsm.server.webadmin 、Tivoli.tsm.license.rte 、Tivoli.tsm.license.cert 、Tivoli.tsm.devices.aix43.rte 。
2.TSM 客戶端軟體安裝
A、以root使用者登陸
B、通過#smitty installp進行軟體的安裝
選擇相應的軟體包進行安裝:Tivoli.tsm.client.ba.aix43.32bit下的Backup/Archive Base files、Backup/Archive Common Files 、Tivoli.tsm.client.books 、Tivoli.tsm.client.web.aix43.32bit、 tivoli.tsm.client.image.aix43.32bit 。
3.TSM for Oracle的軟體的安裝
A、以root使用者登陸
B、通過#smitty installp進行軟體的安裝
選擇相應的軟體包進行安裝:tivoli.tsm.client.api.aix43.64bit、tivoli.tsm.client.oracle.64bit、tivoli.tsm.client.oracle.tools.64bit 。

二、修改環境變數和配置檔案
1.TSM Server和TSM Client安裝完成後對進行環境變數的修改。
在TSM Server的.profile檔案增加如下內容:
export DSMSERV_DIR=/usr/tivoli/tsm/server/bin
export DSMSERV_CONFIG=/usr/tivoli/tsm/server/bin/dmserv.opt
        在TSM Client的.profile檔案增加如下內容:
export DSM_DIR=/usr/tivoli/tsm/client/ba/bin
export DSM_CONFIG=/usr/tivoli/tsm/client/ba/bin/dsm.opt
export DSM_LOG=/usr/tivoli/tsm/client/ba/bin
2.修改TSM Server的dsmserv.opt檔案
解除遮蔽選項:
COMMmethod TCPIP
COMMmethod HTTP
新增下面兩行:
TCPPort 1500
HTTPPort 1580
3.修改TSM Client的dsm.opt和dsm.sys檔案
在dsm.opt檔案中指定TSM Server:
                Servername                tsm(說明此處為TSM Server的名字)
在dsm.sys檔案中新增如下內容:
                SErvername                          tsm
                           COMMmethod               TCPip
                           TCPPort                            1500
                           TCPServeraddress           xxx.xxx.xxx.xxx
                           nodename                   xxxxxxx
passwordaccess                     generate
                           managedservices                        webclient schedule
4.修改/usr/tivoli/tsm/client/oracle/bin/tdpo.opt
DSMI_ORC_CONFIG   /usr/tivoli/tsm/client/api/bin64/dsm.opt
DSMI_LOG           /usr/tivoli/
TDPO_FS            adsmorc
TDPO_NODE          tdpora1
TDPO_OWNER         root
TDPO_PSWDPATH      /usr/tivoli/tsm/client/oracle/bin64
TDPO_DATE_FMT             1
TDPO_NUM_FMT             1
TDPO_TIME_FMT             1

三、TSM 程式管理
1.啟動TSM Server
#/usr/tivoli/tsm/server/bin/dsmserv quiet &
2.啟動TSM Client
#/usr/tivoli/tsm/client/ba/bin/dsmcad
3.停止TSM Server
#/usr/tivoli/tsm/server/bin/dsmadmc(輸入提示的使用者、口令)
dsmadmc>;halt
4.停止TSM Client
通過ps –ef|grep dsmcad 查詢出對應的PID,然後通過kill命令停止程式。
四、TSM軟體配置
1.在作業系統檢查磁帶庫裝置硬體
#lsdev –Cc tape(會看到rmtx和smc0 的狀態為Avaliable),如不能看到則需要安裝3583磁帶庫的驅動程式,具體安裝方法請參見3583相關資料。
2.磁帶庫配置
A、使用tapeutil找到Driver的element值#tapeutil
B、選擇“open a device”:/dev/smc0
C、選擇“elements Information”,就可以得到Driver和Slots的elements值。
E、定義磁帶庫
           define library autolib libtype=scsi(定義一個名字為autolib的SCSI磁帶庫)。
F、定義磁帶庫的PATH(定義TSM SERVER名為TSM所連的接磁帶庫autolib在TSM SERVER中的裝置PTAH:/dev/smc0)。
define path tsm autolib srctype=server desttype=library device=/dev/smc0 nline=yes
        G、定義磁帶機(Driver)(定義磁帶庫autolib中的磁帶機,磁帶機的名字叫做 driver01)。
                        define drive autolib drive01 element=256
        H、定義磁帶機(Driver)的PATH(定義TSMSERVER名為TSM所連線的磁帶庫autolib中的磁帶機在TSM SERVER中的裝置PATH)。
                define path tsm drive01 srctype=server desttype=drive library=autolib device=/dev/rmt0 nline=yes
        I、定義裝置CLASSES
                define devclass ltotape devtype=lto library=autolib format=ultriumc mountlimit=drives mountretention=5 estcapacity=200G
J、檢查磁帶庫的相關配置
        query library、query driver、query path、query devclasses
        K、定義磁帶儲存池
define stgpool 3583_pool ltotape maxscratch=20(定義ltotape裝置類使用的磁帶儲存池3583_pool)。
3.調整TSM DB 和LOG空間的大小
define dbvolume /tsmdata/dblog/db01.dsm formatsize=160 wait=yes
extend db 160
dfine logvloume /tsmdata/dblog/log01.dsm formatsize=100 wait=yes
extend log 100
define spacetrigger db fullpct=85 spaceexpansion=25 expansionprefix=/tsmdata/dblog/
define spacetrigger log fullpct=85 spaceexpansion=25 expansionprefix=/tsmdata/dblog/
reduce db 16
reduce log 8
delete dbvolume /usr/tivoli/tsm/server/bin/db.dsm
delete logvolume /usr/tivoli/tsm/server/bin/log.dsm
安裝TSM SERVER時預設的db和log的大小分別是16,8MB。
4.備份策略的設定
Storage management policies are rules your administrator defines in order to manage your backups and archives on the server(Storage managermanet policies是管理員為了在服務端管理備份和歸檔定義的一種規則)。You can associate (or bind) your data to these policies(你能夠繫結你的資料到這些Policies);when the data is backed up or archived, it is managed according to policy criteria(當資料被備份或歸檔被相應Policy標準管理)。Policy criteria include a policy domain, and a management class ,a policy set, a copy group。
policy決定了是否一個檔案或目錄適合備份或歸檔、保留多少個備份版本、非啟用狀態的備份和歸檔拷貝保留多長時間、拷貝存放在何處。
Policy daemon是一組有相類似備份或歸檔需求資料的客戶機的集合(A policy domain is a group of clients with similar requirements for backing up and archiving data.)。Policy domains contain one or more policy sets。
A policy set is a group of one or more management classes。
A management class is a collection of backup and archive copy groups that establishes and contains specific storage management requirements for backing up and archiving data.
Within a management class, the specific backup and archive requirements are in copy groups. Copy groups define the specific storage management attributes that describe how the server manages backed up or archived data. Copy groups include both backup copy groups and archive copy groups. A management class can have one backup copy group, one archive copy group, both, or neither。
A、建立備份 client node
B、通過WEB方式建立Policy daemon,選擇object class/Policy daemon/define a Policy daemon
C、選擇Policy daemon下面的.Policy sets/define a policy sets,並將policy set給Active
D、選擇Policy sets下面的ManageClass/define a manageclass
E、選擇ManagClass下面的Copy Group
F、將Client node分配到相應的Policy daemon
5.
6.
五、檔案系統備份
六、RMAN的配置
安裝一套獨立與生產資料庫之外的ORACLE資料庫作為catalog database,最好安裝在不同的主機上。
1.在catalog資料庫伺服器上建立RMAN所需要的表空間
$svrmgrl
         svrmgrl>;connect system/manager
svrmgrl>;create tablespace rman_ts datafile ‘;/;’
       >;size 100M autoextend on next 100M maxsize 300M;
2.建立RMAN使用者並賦予角色及許可權
svrmgrl>;create user rman identified by rman
          >;default tablespace rman_ts
          >;temporary tablespace temporary
          >;quota unlimited on rman_ts;
   svrmgrl>;grant recovery_catalog_owner to rman;
   svrmgrl>;connect / as sysdba;
svrmgrl>;grant dba,connect,resource to rman;
3.建立recovery catalog的表結構
$rman target internal/oracle@targetSID  rcvcat rman/rman@recoverycatalogSID
rman>;create catalog;
4.在catalog資料庫中對目標資料庫進行註冊
rman>;register database;
七、ORACLE資料庫的備份
Database備份script:
run {
        allocate channel d1 type sbt_tape connect internal/manager@scdb2 parms
ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt);
        allocate channel d2 type sbt_tape connect internal/manager@scdb1 parms
ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt);
        backup
                   format ctl_t%t_s%s_p%p
                   tag cf
                   (current controlfile);
        backup
                  full
                   filesperset 8
                   format db_t%t_s%s_p%p
           tag fulldb
                   (database);
        release channel d1;
        release channel d2;
}
Archivelog的備份script.:
run {
           allocate channel d1 type sbt_tape parms
ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)
    connect internal/manager@scdb1;
           sql alter system archive log current;
          backup
            format arch_t%t_s%s_p%p
            (archivelog
            like /jfbackup/arch_log/arch_1_%.arc
            delete input);
        release channel d1;
        }
       
run {
           allocate channel d2 type sbt_tape parms
ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)
    connect internal/manager@scdb2;
           sql alter system archive log current;
          backup
            format arch_t%t_s%s_p%p
            (archivelog
            like /jfbackup/arch_log/arch_2_%.arc
            delete input);
        release channel d2;
        }
        同時還可以對指定的tablespace datafile進行備份,具體請參見RMAN相關手冊。
        手工執行ORACLE的備份:
        rman target internal/oracle@targetSID  rcvcat rman/rman@recoverycatalogSID  cmdfile=/xxx/xxx  msglog=xxx.log
八、ORACLE資料庫的恢復
run {
        allocate channel d3 type sbt_tape connect internal/manager@scdb1 parms
ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt);
        allocate channel d4 type sbt_tape connect internal/manager@scdb2 parms
ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt);
        restore controlfile;
        alter database mount;
        restore database;
        recover database;
        release channel d1;
        release channel d2;
        sql "alter database open resetlogs";
        }
九、

Twelve Steps to Configuring Your Tsm Environment

1、Install the TSM code on the machine that will be your TSM server (referred to as server).This process may involve a few steps that are dependent on your  platform. type.Please read the Quick Start Guide and REAMES for yout platform.
2、At the install time you had created default DB and LOG volumes.Now you want to supportment or replace that initial configuration.
A、Add additional DB volumes.i.e. def dbv filename f=volsize Note:make sure they are on separate physical disks form. other DB vols,LOG vols or mirrors of their LOGs or DBs.
B、Extend the data base to use the newly added space.i.e ext db 100
C、Add additional LOG volumes,i.e.def logv filename f=volsize Notice:Same rules apply for LOG volumes as DB volumes.
D、Extend the log to use the newly added space.i.e ext log 100
E、You may have to delete the default volumes that were created during install,i.e del dbv filename or del log filename Notice:You may have to reduce the DB or LOG in order to delete the volume i.e.reduce db 16
3、Now configure you dsmserv.opt file.Read though the default file.There are serval values you may wish to set or adjust.
A、Set yout COMMMethods and there related attributes
B、Set VOLHISTORY and DEVCONFIG,remember make 2 copies
C、Set EXPInterval 0,this will disable expiration.You will have a admin schedule take care of this
D、Set various performance releated attributes,i.e. TCPNODELAY,TCPWindowsize,MAXSessions,BUFPoolsize,LOGPoolsize,TXNGroupmax.etc
E、To use the Web Admin Client set COMMM tcpip,HTTPPort 1580,1580 is the default port number
4、Now you must defined the Libraries,Drivers and Device Classes your system will use
A、You must define libraries frist.Both manual and automated libraries can be defined,i.e.manual –def lib manlib libtype=manual or automated –def lib autolib libtype=scsi device=dec_spec
B、Now define drives in your libraries,i.e manual –def dr manlib mandr device=dec_spec or def dr autolib autodriv1 device=dec_spec element=element#
C、Now we can create device classes.You can have more than 1 device class use the same library if yoy like.Notelease refer to the documentation for def dev command.There are many options available.
5、Once we have Device Classes we can create Storage Pools that will use them,also,we must establish or SP hierarchy.
A、Determine the number of top level pools you will need.They will typically be Disk based SPs
B、Next decide on the hierarchy from the top levels to the final pools.Make sure you consider things like:Backup vs Archive data,Collocation,Offsite (copy pools) vs Local.etc.
C、Create the necessary storage pools with the appropriate attributes.In particular consider,the valus for migration,reclamation and next storage pool as they will also affected by your administrative schedules.Nore: Please consult the documentation for the def stg command.There are many options available.
6、Nextt you right create Policy Domian(s) and right Policy that is reflective of your Service Level Agreement(SLA).
A、Determine how you will group your manages systems.i.e.1 Policy Domain or several.
B、Create you policy domain(s).Note:The following steps will be repeated for each Policy domain
ü        def do mydomain
ü        def po mydomain myposet
ü        def mg mydomain myposet mymc Note:Create as many Management Classes as necessary.
ü        def co mydomain myposet mymc standard type=backup…
ü        def co mydomain myposet mymc standard type=archive…
Note:above two lines are optional for any given Management Class
ü        as defmg mgname
ü        val po mydomain myposet
ü        act po mydomain myposet
Note:Each of the above steps have many options,especially the def co commands,so please consult the documentation
7、You probably want to go home at night so lets define some client schedules.Please remember client schedules are within a given Policy Domain,therefore you may want to right a schedule once and copy it to different domains if necessary.
A、Create a schedule to do your nightly Incremental backups.Your clients Domain and Include/Exclude list should be written so that all that is need in the schedule is just I with no file specification given.
B、Right any other schedules that maybe appropriate for you needs.Note:def sch command has several options,so please consult the documentation.
8、The server will need some schedules as well.The followingis just a list of some things you should consider for scheduling.This is not intend to be a complete list nor do I attempt to make a 24 hour plan.The timings will depand entirely on your environment.There is a good example of a 24 hour schedule plan in the “Getting Statrted with Tivoli Storage Manager:Implementation Guide”.
A、migration,reclamation,expiration,DB Backups, SPs      Backups,Clean Volhist, backup Volhist and Devconfig,DRM
B、Consider the time and order to do these things,in general do one things at a time,backup the DB after large changes
C、Remember to allow down time in your schedule.That is time when nothing is scheduled,so you can catch up if needed
9、There are just a few other miscellaneous server function left.
A、Create your client option sets.these are client options that you are going to override at the server.
ü        Define one or more client option sets.i.e.def clo ntclients
ü        Next define the various options for each client option set.i.e.def cliento ntclients compress no
B、Add any additional administrators thal you will need,i.e.server admins,help desk workers,operators,etc.
ü        reg admin jradmin jrpasswd
ü        grant auth jradmin…
Note:Consult the documentation for all the extra options.
C、Label and checkin tape media.For NT,W2K and UNIX you can use the label libvol command.
10、Now it is time at register you managed system(refereed to as clients).
A、Things to consider at registration time,what domain and client option set to associate them with.
B、reg node node_name node_password domain= domain_name clopset=ntclients
C、This must be done for every managed system,consider scripting it if you have a large number of clients.
D、You must associate the node with the schedules you would like it to use.i.e.def assoc domain schedule node
Note:You can only associate nodes to schedules within their domain
11、The managed system(clients) must have the client code installed.Consult the “Installing the Clients Guide” for details on the different platforms that you will be using.
12、Once the clients are installed you will need to update the dsm.opt file and the dsm.sys(unix only) file.
A、Select a(just one)COMMMethod and configure any associated parms for that method,i.e.COMMM tcpip,TCPPort 1500,TCPServer server.dot.decimal.addr
B、Configure schedule log,error log and their retention time,i.e.SCHEDLOGName dsmsched.log,SCHEDLOGRetention 10,ERRORLOGName dsmerr.log
C、Set performance related attributes.Consult the documentation for appropriate values for your environment,i.e.TCPB,TCPW,TXNB,etc.
D、Configure you Domain and Include/Exclude statements.The goal here is to eliminate those files you do not wish to backup and to bind particular files to a specific Management Class.
E、Insure that the dsmc sched program runs either as a service or a daemon when the client is rebooted.
F、Set passwordaccess generate This will allow the scheduler to authenticate automatically.
G、Configure the client to be accessed through the web client interface.
ü        This will vary from platform. to platform. so please consult the Installing the Clients manual.
ü        In general,you will need to have the TSM client acceptor service/daemon running.
ü        TSM Client Acceptor service/daemon is generally started at boot time.
ü        Passwordaccess generate is required in the dsm.opt(dsm.sys for unix) file.

TSM server安裝
步驟一
smit安裝所需要的軟體包:
        Tivoli.tsm.server.rte
        Tivoli.tsm.server.com
        Tivoli.tsm.server.webadmin
        Tivoli.tsm.license.rte
        Tivoli.tsm.license.cert
        Tivoli.tsm.devices.aix43.rte


步驟二
修改環境變數
        export DSMSERV_DIR=/usr/tivoli/tsm/server/bin
export DSMSERV_CONFIG=/usr/tivoli/tsm/server/bin/dmserv.opt

步驟三
修改dsmserv.opt檔案
        解除遮蔽:
                COMMmethod TCPIP
                   COMMmethod HTTP
        新增:
                    TCPPort 1500
HTTPPort 1580

步驟四
建立server的自動執行:
        在TSM server軟體包安裝完成後,系統自動在inittab中新增了自動執行:
autosrvr:2nce:/usr/tivoli/tsm/server/bin/rc.adsmserv >;/dev/console 2>;&1
        注意:在有HA的情況下,不能使用該方式。

手動執行server:
        dsmserv quiet &


步驟五
修改server名稱等屬性:
        物件檢視->;伺服器->;伺服器狀態
        注意:口令有效期限

步驟六
使用命令列註冊license
        reg lic file=[license file] number
        在TSM server安裝完成後,在/usr/Tivoli/tsm/server/bin下會產生多個字尾為lic的license
檔案,據此註冊。

        在本次安裝中,使用:
        reg lic file=*.lic number=2


步驟七
格式化DB、LOG和磁碟儲存池所需要的空間
例如:
        dsmfmt -m -db /tsmdata/db01.dsm 300
        dsmfmt -m -log /xzbackup/tsmdata/log01.dsm 300
        dsmfmt -m -data /xzbackup /tsmdata/babkvol.dsm 200
        dsmfmt -m -data /xzbackup /tsmdata/baarcvol.dsm 200
        dsmfmt -m -data /xzbackup /tsmdata/tdpbkvol.dsm 200
                                                                                                        `
步驟八
擴充套件DB和LOG

使用web方式:
object view ->; Database ->; Database Volumes ->; Operations: ->; Define Database Volume

object view ->; Recovery log ->; Recovery log vo.umes ->; Operations: ->; Define Recovery log volume


步驟八
新建babkpool
        baarcpool
        tdpbkpool

Storage Pool Name          
Description         
Media Access Status         
Maximum Size Threshold         
Next Storage Pool         
High Migration Threshold         
Low Migration Threshold         
Cache Migrated Files?          YES  NO
Migration Processes         
Migration Delay         
Migration Continue          YES  NO
Copy Storage Pool(s)         
Continue Copy on Error?          YES  NO
CRC Data          YES  NO
       

步驟九
定義與3583帶庫有關的物件

3583裝置檔名:
庫裝置為/dev/smc0
        drive為/dev/rmtx
若系統中已經有一個DDS帶機(dev/rmt0),那麼帶庫中的第一個drive裝置名稱
為/dev/rmt1。
                       
使用tapeutil查詢3583 drive的element號
        1.# tapeutil
        2. 選:“1. Open a Device”,輸入device名稱:/dev/smc0
        3.選:“12. Element Information”,便可查詢到drive的element號。
一般來說第一個drive的element號為256

定義庫
select object view ->; server storage ->; Libraries and Drives ->; Automated Libraries ->; Operations: ->; Define Automated Library
library name :        3583
device:                /dev/smc0

定義驅動器
驅動器一:
select object view ->; server storage ->; Libraries and Drives ->; Automated Drives ->; Operations: ->; Define Automated Drive
        Library Name                         3583
        Drive Name                         3583_drive1
        Device                                 /dev/rmt1
        Element                                 256                ( 256 just for 3583 drive 1, you should find out element information via tapeutil )
        Device On-Line                                                       YES NO
        Cleaning Frequency (Gigabytes/ASNEEDED/NONE)
驅動器二:
define second drive
select object view ->; server storage ->; Libraries and Drives ->; Automated Drives ->; Operations: ->; Define Automated Drive
        Library Name                         3583
        Drive Name                         3583_drive2
        Device                                 /dev/rmt2
        Element                                 257                ( you should find out element information via tapeutil )
        Device On-Line                                                       YES NO
        Cleaning Frequency (Gigabytes/ASNEEDED/NONE)

定義LTO裝置類
For 3583:
select object view ->; server storage ->; Device Classes ->; LTO Device Classes ->; Operations: ->; Define Device Class
                     Device Class Name                 3583_Class
                     Recording Format                 Drive
                     Library Name                 3583
                     Mount Limit                         DRIVES
      &nbs, p;              Mount Retention                 60
                     Tape Volume Prefix                 ADSM
                     Estimated Capacity                
                     Mount Wait                         60

步驟十
1.為BA建立策略域
(先用預設值)
badomain
2.為TDP client建立策略域tdpdomain
注意:TDP client所使用的拷貝副本組屬性必須是:
VERDELETED=0
RETONLY=0

為TDP建立策略域、策略集、管理類示例:

tsm: BRAZIL>;def domain api_domain DESC=DO for all DB-Backups
ANR1500I Policy domain API_DOMAIN defined.
tsm: BRAZIL>;

tsm: BRAZIL>;def policyset api_domain api_policy DESC=PO for all DB Backups
ANR1510I Policy set API_POLICY defined in policy domain API_DOMAIN.

tsm: BRAZIL>;def mgmtclass api_domain api_policy api_mgmtclass DESC=MC for all DB-Backups
ANR1520I Management class API_MGMTCLASS defined in policy domain API_DOMAIN, set API_POLICY.
tsm: BRAZIL>;

以下為建立拷貝副本組,需注意選項值:
tsm: BRAZIL>;def copygroup api_domain api_policy api_mgmtclass type=archive DEST=api_disk retver=nolimit
ANR1535I Archive copy group STANDARD defined in policy domain API_DOMAIN, setAPI_POLICY, management class API_MGMTCLASS.

tsm: BRAZIL>;def copygroup api_domain api_policy api_mgmtclass type=backup DEST=api_disk_ vere=1 verd=0 rete=0 reto=0
ANR1530I Backup copy group STANDARD defined in policy domain API_DOMAIN, set
API_POLICY, management class API_MGMTCLASS.

 

步驟十一
建立include-exclude list
在client的dsm.sys中加入:
1.domain /home /usr /datasave
當使用命令時dsmc incremental -domain="/fs1 /fs2"將備份domain指定的/home, /usr, /datasave檔案系統,以及備份命令中由-domain指定的/fs1和/fs2檔案系統

步驟十二
建立排程

        持續時間:5小時
        週期:根據使用者需求而定,每隔多長時間務器排程執行一次。

測試排程
        可先調整一個合適的時間測試完成後再調回


B-A安裝配置

步驟一.
Smit安裝B-A client所需要安裝的軟體包
Tivoli.tsm.client.ba.aix43.32bit下的:
        Backup/Archive Base files
        Backup/Archive Common Files
Tivoli.tsm.client.books
Tivoli.tsm.client.web.aix43.32bit
tivoli.tsm.client.image.aix43.32bit
(api在TDP安裝時安裝)

步驟二
        修改環境變數
                export DSM_DIR=/usr/tivoli/tsm/client/ba/bin
export DSM_CONFIG=/usr/tivoli/tsm/client/ba/bin/dsm.opt
export DSM_LOG=/usr/tivoli/tsm/client/ba/bin

(以下為server端的環境變數:
                        export DSMSERV_DIR=/usr/tivoli/tsm/server/bin
export DSMSERV_CONFIG=/usr/tivoli/tsm/server/bin/dmserv.opt)


步驟三.
需要修改的檔案:
dsm.opt檔案:
        Servername      tsm

dsm.sys檔案:
SErvername                          tsm
           COMMmethod               TCPip
           TCPPort                    1500
           TCPServeraddress           133.54.9.11
           nodename                   client1
passwordaccess             generate
           managedservices                webclient schedule

步驟四
啟動dsmcad
        /usr/Tivoli/tsm/client/ba/bin/dsmcad

TDP for Oracle客戶端安裝

smit安裝以下軟體包:
tivoli.tsm.client.api.aix43.64bit
tivoli.tsm.client.oracle.64bit
tivoli.tsm.client.oracle.tools.64bit

編輯tdpo.opt檔案:
在/usr/tivoli/tsm/client/oracle/bin/目錄下新建檔案tdpo.opt
***************************************************************************
* Tivoli Storage Manager - Tivoli Data Protection for Oracle
*
* Sample tdpo.opt for the AIX TDP for Oracle
*********************************************************************

DSMI_ORC_CONFIG   /usr/tivoli/tsm/client/api/bin64/dsm.opt
DSMI_LOG           /usr/tivoli/

TDPO_FS            adsmorc
TDPO_NODE          tdpora1
TDPO_OWNER         root
TDPO_PSWDPATH      /usr/tivoli/tsm/client/oracle/bin64

TDPO_DATE_FMT             1
TDPO_NUM_FMT             1
TDPO_TIME_FMT             1

*TDPO_MGMT_CLASS2   mgmtclass2
*TDPO_MGMT_CLASS3   mgmtclass3
*TDPO_MGMT_CLASS4   mgmtclass4

編輯api client的dsm.opt檔案
* SErvername       A server name defined in the dsm.sys file
SErvername       tsm

編輯api client的dsm.sys檔案

Servername                        tsm
COMMmethode                TCPip
TCPPort                        1500
TCPServeraddress                133.54.9.11
nodename                        tdpora1
PASSWORDAccess        prompt

在TSM server註冊api client(tdpora1)

初始化password:
使用tdpoconf password -tdpo_optfile=[TDP for Oracle option檔案]
        如果tdpo.opt在預設目錄下,該命令可不需要引數
        產生的password檔名為:TDPO.[節點名] (注意大小寫)

        該口令與TSM server註冊該節點時的口令相同

        注意:如果在執行tdpoconf時出現錯誤,那麼可能是api64目錄下的dsm.sys和dsm.opt檔案,以及tdpo.opt檔案的內容或檔案屬性有問題。比較.smp檔案的屬性,以其為準。

確認安裝
1.顯示TDP的環境變數:
tdpoconf showenv
顯示:


重新連線oracle備份的庫檔案
1.關閉oracle
2.重新連線庫檔案:
#rm $ORACLE_HOME/lib/libobk.a
#ln -s /usr/lib/libobk.a $ORACLE_HOME/lib/libobk.a
3.啟動oracle


 
 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/235507/viewspace-677316/,如需轉載,請註明出處,否則將追究法律責任。

相關文章