利用Tivoli Storage Manager做系统备份
前一阵刚刚给我们组搭建了一台CVS服务器,用于管理我们的Auomation TAF代码,美国的同事说必须要用TSM做备份,防止这些资源的意外丢失不可恢复。这是公司对于Property保护的必要措施。起初连TSM是什么都不清楚,后来终于了了解了,还是在本地搭一个吧,用SVL TSM Server一是慢,二是自己的管理权限不够。于是就有了下篇的文章,记录我从搭一个TSM server,并把我们的CVS server座位client,把backup保存在TSM Server上的过程。
1. Tivoli Storage Manager Introduction
TSM is storage management software that automates data backup and restore functions IBM Tivoli Storage Manager (TSM or ITSM) is a centralized, policy-based, enterprise class, data backup and recovery software. The software enables the user to insert objects not only via backup, but also through space management and archive tools. It also allows to retrieve the same data via similar restore, recall, and retrieve methods.
2. Installation
Server Installation:
tar xjf 5.5.0.0-TIV-TSMSRV-LinuxIA64.tar.bz2
Run the install_server script. The syntax is:
./install_server
默认安装到 /opt/Tivoli/
Client installation:
Windows上直接安装exe文件,Linux/UNIX上直接安装rpm包。
3. 启动TSM
1. Start TSM server
./dsmserv
会进入TSM交互命令窗口,就像db2cmd > db2命令一样。
Tivoli Storage Manager for Linux/i386
Version 5, Release 4, Level 3.0
Licensed Materials – Property of IBM
(C) Copyright IBM Corporation 1990, 2007.
All rights reserved.
U.S. Government Users Restricted Rights – Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corporation.
ANR7800I DSMSERV generated at 13:24:53 on Mar 26 2008.
ANR7801I Subsystem process ID is 3220.
ANR0900I Processing options file dsmserv.opt.
ANR4726I The ICC support module has been loaded.
ANR0990I Server restart-recovery in progress.
ANR0200I Recovery log assigned capacity is 8 megabytes.
ANR0201I Database assigned capacity is 16 megabytes.
ANR0306I Recovery log volume mount in progress.
ANR0353I Recovery log analysis pass in progress.
ANR0354I Recovery log redo pass in progress.
ANR0355I Recovery log undo pass in progress.
ANR0352I Transaction recovery complete.
ANR1635I The server machine GUID, 04.6d.13.c0.14.3e.df.11.87.2c.00.14.5e.7a.75.c6, has initialized.
ANR2100I Activity log process has started.
ANR4726I The NAS-NDMP support module has been loaded.
ANR1305I Disk volume /opt/tivoli/tsm/server/bin/backup.dsm varied online.
ANR1305I Disk volume /opt/tivoli/tsm/server/bin/archive.dsm varied online.
ANR2803I License manager started.
ANR8200I TCP/IP driver ready for connection with clients on port 1500.
ANR0993I Server initialization complete.
ANR9639W Unable to load Shared License File dsmreg.sl.
ANR2560I Schedule manager started.
ANR0984I Process 1 for EXPIRATION started in the BACKGROUND at 01:45:39 PM.
ANR0916I TIVOLI STORAGE MANAGER distributed by Tivoli is now ready for use.
ANR0811I Inventory client file expiration started as process 1.
ANR9652I An EVALUATION LICENSE for IBM System Storage Archive Manager will expire on 05/03/2010.
ANR0812I Inventory file expiration process 1 completed: examined 0 objects, deleting 0 backup objects, 0 archive objects
volumes, and 0 recovery plan files. 0 errors were encountered.
ANR9652I An EVALUATION LICENSE for Tivoli Storage Manager Basic Edition will expire on 05/03/2010.
ANR9652I An EVALUATION LICENSE for Tivoli Storage Manager Extended Edition will expire on 05/03/2010.
ANR2828I Server is licensed to support IBM System Storage Archive Manager.
ANR2828I Server is licensed to support Tivoli Storage Manager Basic Edition.
ANR2828I Server is licensed to support Tivoli Storage Manager Extended Edition.
ANR0985I Process 1 for EXPIRATION running in the BACKGROUND completed with completion state SUCCESS at 01:45:39 PM.
TSM:SERVER1>
4. 添加并注册client node到server
register node ITS_CDL_CVS passw0rd
5. Backup client node
Client根据wizard向导备份指定的文件。
但是当尝试在CVS Server也就是TSM Client上做backup时,确出现如下错误:
Server interactive console上打印出:
TSM:SERVER1>
ANR0406I Session 8 started for node ITS_CDL_CVS (WinNT) (Tcp/Ip 9.125.138.29(1843)).
ANR0522W Transaction failed for session 8 for node ITS_CDL_CVS (WinNT) – no space available in storage pool BACKUPPOOL and all
successor pools.
ANR0522W Transaction failed for session 8 for node ITS_CDL_CVS (WinNT) – no space available in storage pool BACKUPPOOL and all
successor pools.
ANR0403I Session 8 ended for node ITS_CDL_CVS (WinNT).
解决办法:
1) 查看BACKUPPOOL容量仅为10M,太小了,需要加大此Volume容量。
QUERY VOLUME
ANR2017I Administrator SERVER_CONSOLE issued command: QUERY VOLUME
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 85.3 On-Line
bin/backup.dsm
QUERY VOLUME format=detailed
ANR2017I Administrator SERVER_CONSOLE issued command: QUERY VOLUME format=detailed
Volume Name: /opt/tivoli/tsm/server/bin/archive.dsm
Storage Pool Name: ARCHIVEPOOL
Device Class Name: DISK
Estimated Capacity: 5.0 M
Scaled Capacity Applied:
Pct Util: 0.0
Volume Status: On-Line
Access: Read/Write
Pct. Reclaimable Space:
Scratch Volume?:
In Error State?:
Number of Writable Sides:
Number of Times Mounted:
Write Pass Number:
Approx. Date Last Written:
Approx. Date Last Read:
Date Became Pending:
Number of Write Errors:
Number of Read Errors:
Volume Location:
Volume is MVS Lanfree Capable :
Last Update by (administrator): SERVER_CONSOLE
Last Update Date/Time: 04/02/2010 01:01:12 PM
Begin Reclaim Period:
End Reclaim Period:
Drive Encryption Key Manager:
Volume Name: /opt/tivoli/tsm/server/bin/backup.dsm
Storage Pool Name: BACKUPPOOL
Device Class Name: DISK
Estimated Capacity: 10.0 M
Scaled Capacity Applied:
Pct Util: 85.3
Volume Status: On-Line
Access: Read/Write
Pct. Reclaimable Space:
Scratch Volume?:
In Error State?:
Number of Writable Sides:
Number of Times Mounted:
Write Pass Number:
Approx. Date Last Written:
Approx. Date Last Read:
Date Became Pending:
Number of Write Errors:
Number of Read Errors:
Volume Location:
Volume is MVS Lanfree Capable :
Last Update by (administrator): SERVER_CONSOLE
Last Update Date/Time: 04/02/2010 01:01:11 PM
Begin Reclaim Period:
End Reclaim Period:
Drive Encryption Key Manager:
2) 定义新的dsm文件作为Volume
TSM:SERVER1>
define volume BACKUPPOOL /opt/tivoli/tsm/server/bin/backup2.dsm access=readwrite formatsize=1000
ANR2017I Administrator SERVER_CONSOLE issued command: DEFINE VOLUME BACKUPPOOL /opt/tivoli/tsm/server/bin/backup2.dsm access=readwrite
formatsize=1000
ANR0984I Process 3 for DEFINE VOLUME started in the BACKGROUND at 02:45:24 PM.
ANR2491I Volume Creation Process starting for /opt/tivoli/tsm/server/bin/backup2.dsm, Process Id 3.
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 85.3 On-Line
bin/backup.dsm
/opt/tivoli/tsm/server/- BACKUPPOOL DISK 1,000.0 M 0.0 On-Line
bin/backup2.dsm
6. 定义一个Scheduler来定时backup
启动Scheduler每天都执行backup:
TSM:SERVER1>
define schedule standard daily_backup starttime=05:00 duration=2 durunits=hours
ANR2017I Administrator SERVER_CONSOLE issued command: DEFINE SCHEDULE standard daily_backup starttime=05:00 duration=2 durunits=hours
ANR2500I Schedule DAILY_BACKUP defined in policy domain STANDARD.
TSM:SERVER1>
define association standard daily_backup ITS_CDL_CVS
ANR2017I Administrator SERVER_CONSOLE issued command: DEFINE ASSOCIATION standard daily_backup ITS_CDL_CVS
ANR2510I Node ITS_CDL_CVS associated with schedule DAILY_BACKUP in policy domain STANDARD.
TSM:SERVER1>
query schedule standard
ANR2017I Administrator SERVER_CONSOLE issued command: QUERY SCHEDULE standard
Domain * Schedule Name Action Start Date/Time Duration Period Day
———— – —————- —— ——————– ——– —— —
STANDARD DAILY_BACKUP Inc Bk 04/02/2010 05:00:00 2 H 1 D Any
AM
Storage Management Server for Linux/i386 – Version 5, Release 4, Level 3.0
TSM:SERVER1>
注:Useful Links:
TSM IC:http://publib.boulder.ibm.com/infocenter/tivihelp/v1r1/index.jsp
以上只是很简单的搭建了一个TSM server做备份,TSM是一个很复杂很强大的产品,继续学习,有待挖掘。