免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 9246 | 回复: 16
打印 上一主题 下一主题

[存储备份] TSM+TDP+RMAN备份安装配置及说明(原原创) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-11-23 11:03 |只看该作者 |倒序浏览
1. 新建一独立的文件系统 /usr/tivoli,空间大小视所要使用的disk pool而定。

2.安装HTTP Server和Netscape communicator(可选)。

3.在服务器上安装TSM SERVER端软件。

4.安装 TSM CLIENT FOR AIX 软件。

需要安装的软件包如下:

tivoli.tsm.books.en_US.client.htm
  tivoli.tsm.books.en_US.client.pdf
  tivoli.tsm.client.api.32bit
  tivoli.tsm.client.api.64bit
  tivoli.tsm.client.ba.32bit.base
  tivoli.tsm.client.ba.32bit.common
  tivoli.tsm.client.ba.32bit.image
  tivoli.tsm.client.ba.32bit.nas
  tivoli.tsm.client.ba.32bit.web
  tivoli.tsm.client.oracle.aix51.64bit
  tivoli.tsm.client.oracle.tools.aix51.64bit
  tivoli.tsm.loc.client.oracle.aix51.64bit.ela
  tivoli.tivguid 1.3.0.0  COMMITTED  IBM Tivoli GUID on AIX

5.  编辑客户端配置文件:
#cd /usr/tivoli/tsm/client/ba/bin
在 dsm.sys文件中,设置如下信息:
servername server_name (服务器的名字,比如tsmserv)
commmethod tcpip
tcpport port_address  (通常选缺省值1500)
tcpserveraddress server_address (服务器的IP地址或可解析的名字)
nodename client
passwordaccess generate   (为了使用定时功能应增加此选项)


在 dsm.opt文件中,设置如下信息:
servername server_name


启动客户端图形界面,输入如下命令:
# dsmj
ID Name: client
Password: client
即可以按图形方式进行备份测试。

配置服务器端

论坛徽章:
0
2 [报告]
发表于 2005-11-23 11:06 |只看该作者

配置服务器

设置环境变量
export DSMSERV_DIR=/usr/tivoli/tsm/server/bin
export DSMSERV_CONFIG=/usr/tivoli/tsm/server/bin/dsmserv.opt
export DSMSERV_ACCOUNTING_DIR=/home/engineering

To use the administrative Web interface:
Your browser must provide Java 1.1.6 support.
Configure the HTTP communication method in your server options file(dsmserv.opt).
COMMmethod http
HTTPPort 1580
c.        Enter the following command:
./dsmserv runfile /usr/tivoli/tsm/server/webimages/dsmserv.idl
6.        To start the server.
Enter the following command:
./dsmserv

安装WEBINTERFACE的几个包
1、AIX.IDL
2、imager
3、help
直接解压COPY到相应的目录就可以了。

论坛徽章:
0
3 [报告]
发表于 2005-11-23 11:08 |只看该作者

或者安装ISC

或着用一台WINDOWS的机器安装ISC的控制端去管理相应的TSM服务器。

论坛徽章:
0
4 [报告]
发表于 2005-11-23 11:12 |只看该作者

配置服务器和客户机

ID Name: client
Password: client
即可以按图形方式进行备份测试。



启动管理员客户端命令行界面:
#dsmadmc
ID Name: admin
Password: admin
tsm: TSM>

可以选择性的启动Console方式管理员客户端命令行界面:
#dsmadmc -consolemode
ID Name: admin
Password: admin
会有类似如下信息:
Session established with server TSM: AIX-RS/6000...
  ......
随后所有的log信息将同时显示在该窗口中。

启动Web方式管理界面:在浏览器URL栏输入如下地址http://tsmserv:1580

Registering Licenses
tsm: TSM>register license file=mgsyslan.lic number=10
tsm: TSM>register license file=mgsyssan.lic number=10
tsm: TSM>register license file=oracle.lic number=10
tsm: TSM>register license file=library.lic number=1
tsm: TSM>register license file=libshare.lic number=1

Increasing Database and Recovery Log Sizes
Format and define a 500MB database volume and a 25MB recovery log volume
and extend the database and recovery log, by entering:
tsm: TSM>define dbvolume db01.dsm formatsize=500
tsm: TSM>define logvolume log01.dsm formatsize=25
tsm: TSM>extend db 500
tsm: TSM>extend log 25


Increasing Disk Storage Pool Sizes
For example, to create a 100MB volume named sbkup01.dsm in BACKUPPOOL, do the following:
tsm: TSM> define volume backuppool backup01.dsm formatsize=100


Adding Backup-Archive Clients
For example, register a node named MERCEDES with the password MONTANA.
tsm: TSM> register node mercedes montana userid=none

tsm: TSM>

Excluding System Files
For UNIX, we recommend that you have the following minimum include-exclude
list in your include-exclude options file:
exclude /unix/
exclude.dir /unix/
exclude /.../core
exclude.fs /usr/tivoli

Automating Client Operations
You can schedule the following on most clients:
l        TSM backup, archive, restore, and retrieve operations
l        Operating system commands
l        Macros (files that can contain operating system and TSM commands)

1.        Schedule an incremental backup and associate the schedule with the clients.
a. Expand Automation.
b. Select Client Schedules.
c. From Operations, select Define Schedule.
d. Enter the schedule information and Finish.
e. Return to Client Schedules.
f. Select the desired schedule.
g. From Operations, select Define Associations.
h. Enter the association information and Finish.

2.        Start the client scheduler. For the schedules to become active for a workstation,a user must start the scheduler from the node.

启动客户机调度程序
To start the client scheduler on your client node and connect to the server
schedule, change to the Tivoli Storage Manager installation directory and enter the following command:
dsmc schedule(启动客户机调度程序)
When you start the client scheduler, it runs continuously until you close the window, end the process, or log off your system.
To run the schedule command in the background and to keep the client scheduler
running, even if you log off your system, enter the following:
nohup dsmc schedule >/dev/null 2>&1 (后台启动客户机调度程序)
If a Tivoli Storage Manager password is required for your workstation and you want to run the schedule command in the background, enter the password with the command.
Root User: To start the client scheduler automatically, ensure that the
passwordaccess option is set to generate in your client system options file
(dsm.sys), then , add the following entry to the /etc/inittab file:
tsm:nce:/usr/bin/dsmc sched > /dev/null 2>&1 # TSM scheduler(开机自动启动客户机调度程序)
Note: You must include the redirection to /dev/null in the command.


Adding an Automated Tape Library to the Server

1.        Define an automated tape library and its two internal drives.
tsm:TSM> define library autolib libtype=scsi
tsm:TSM> define path tsm autolib srctype=server desttype=library device=/dev/smc0 online=yes
tsm:TSM> define drive autolib drive01 element=82
tsm:TSM> define path tsm  drive01 srctype=server desttype=drive library=autolib device=/dev/rmt1 online=yes
tsm:TSM> define drive autolib drive02 element=83
tsm:TSM> define path tsm  drive02 srctype=server desttype=drive library=autolib device=/dev/rmt2 online=yes

2.        Classify the drives in the library by device type. It is helpful to choose a device class name that identifies the type of device for which it is intended (in this example, AUTOCLASS).
tsm:TSM> define devclass autoclass devtype=8mm format=8500 library=autolib

3.        Define a storage pool named AUTOPOOL for the device class.
tsm:TSM> define stgpool autopool autoclass maxscratch=20

Displaying Information About Your Devices
To query the libraries:
tsm:TSM> query library
To query the drives:
tsm:TSM> query drive
To query the paths:
tsm:TSM> query path
To query the device classes:
tsm:TSM> query devclass format=detailed
To query the storage pools:
tsm:TSM> query stgpool

Preparing Tape Volumes with an Automated Library

1.        Use the LABEL LIBVOLUME command to label and check in the volumes. From an administrative client command line, begin a search of an automated library named AUTOLIB for unlabeled volumes and label them based on their barcodes:
tsm:TSM> label libvolume autolib search=yes labelsource=barcode
checkin=scratch
2.        Define any volumes that are to be used as private volumes.
tsm:TSM> define volume autopool dsm001

Including Tape in the Storage Hierarchy
You can now configure the server so that client data can be migrated to tape. To migrate from BACKUPPOOL to AUTOPOOL and from ARCHIVEPOOL to TAPEPOOL do the following:
tsm:TSM> update stgpool backuppool nextstgpool=autopool
tsm:TSM> update stgpool archivepool nextstgpool=tapepool

Migrating Data from Disk to Tape

Trigger migration from a disk storage pool (BACKUPPOOL, for example) by setting the high and low migration thresholds to 0:
tsm:TSM> update stgpool backuppool highmig=0 lowmig=0
After migration occurs, reset the thresholds to their original settings:
tsm:TSM> update stgpool backuppool highmig=90 lowmig=70

Invoking Expiration Processing
Expired files are not deleted from server storage until expiration processing occurs. You can invoke expiration processing in a number of ways:
The expiration interval server option can specify that processing be invoked at a set interval from the time the server is started. The default is a 24 hour interval.
·        You can issue the EXPIRE INVENTORY command manually whenever you wish (see the following example).
·        You can schedule the EXPIRE INVENTORY command to be issued regularly at a specific time (see “Automating Administrative Commands” on page 61). If you schedule expiration processing, set the expiration interval server option to 0.(edit dsmserv.sys)
for example:
tsm:TSM> expire inventory quiet=yes wait=no


Automating Administrative Commands
You can automate TSM administrative tasks by scheduling administrative commands. For example, you can automate commands that need to be run regularly or that require significant processing or other system resources. In this section, you define a schedule to run expiration processing.
1. Define a schedule named EXPPROC that invokes expiration processing every night at 2:00 a.m.
This schedule calls for a schedule window that:
·         Begins on the date the schedule is defined (the default) at 2:00 a.m.
·         Lasts for 1 hour (the default)
·         Is repeated every day
·         Takes effect immediately
·         Stays in effect indefinitely (the default)
tsm:TSM> define schedule expproc type=administrative - cmd='expire inventory' active=yes starttime=02:00

论坛徽章:
0
5 [报告]
发表于 2005-11-23 11:13 |只看该作者

配置2

2. Because the EXPPROC schedule is to run daily, you can verify that the automation is working as it should on the day after you define the schedule. If the schedule has run successfully, the status will be Completed.

tsm:TSM> query event expproc type=administrative begindate=today-1

Protecting Tivoli Storage Manager and Client Data
The database, recovery log, and storage pools are critical to the operation of the server. If the database or recovery log is unusable, the entire server is unavailable. If a database is lost and cannot be recovered, the backup, archive, and space-managed data for that server is lost. If a storage pool volume is lost and cannot be recovered, the data on the volume is also lost.
Tivoli Storage Manager provides a number of ways to protect your data, including backing up your storage pools and database. For example, you can define schedules so that the following operations occur:
·        After the initial full backup of your storage pools, incremental storage pool backups are done nightly.
·        Full database backups are done weekly.
·        Incremental database backups are done nightly.


Backing Up the Database
Before your first backup, you must do some or all of the following steps:
·        Define device classes for backups
·        Set the recovery log mode
·        Schedule database backups
·        Estimate the recovery log size
·        Automate database backups to occur according to a defined schedule or when the recovery log utilizations reaches a specified percentage.

To restore your database, you must have copies of (or be able to create) the following information:
·        Volume history file
·        Device configuration file
·        Server options file
·        Database and recovery log set up (the output from detailed queries of your database and recovery log volumes).

最好是定义一个fileclass用于Database backup,Database backup完成后,将Backup 文件转存保留副本。(Database也可以直接备份到磁带上)
tsm:TSM> backup db type=full devclass=fileclass1(全备份)
tsm:TSM> backup db type=incremental devclass=fileclass1(增量备份)
存放在/usr/tivoli/tsm/db_backup目录下,应该定期将这些备份文件妥善保存到别的地方,并将已做过保存的文件删除。
Backing Up Storage Pools


tsm:TSM>
tsm:TSM>

Automatic Tuning of Server Options
For optimal performance, the server can tune the following server options
automatically:
·        MOVEBATCHSIZE and MOVESIZETHRESH
To have the server automatically tune the MOVEBATCHSIZE and MOVESIZETHRESH options, set the SELFTUNETXNSIZE option to Yes. When the server performs an internal data movement operation, such as migration, reclamation, move data, storage pool backup or restore, it will adjust these values to achieve optimal performance. To prevent running out of log space during these operations, use the DEFINE SPACETRIGGER command to allow for expansion of the recovery log.
·        BUFPOOLSIZE
To have the server automatically tune the BUFPOOLSIZE option, set the SELFTUNEBUFPOOLSIZE option to Yes. Before expiration processing, the server resets the database buffer pool and examines the database buffer pool cache hit ratio. The server accounts for the amount of available storage and adjusts the
buffer pool size as needed.
Note: Although the values of TXNGROUPMAX, MOVEBATCHSIZE, and MOVESIZETHRESH may be changed, the settings in the server options file are not changed. Issuing a QUERY OPTION command displays only what is set in the server options file.

论坛徽章:
0
6 [报告]
发表于 2005-11-23 11:18 |只看该作者

安装TDP

tivoli.tsm.client.api.64bit
tivoli.tsm.client.oracle.aix51.64bit
tivoli.tsm.client.oracle.tools.aix51.64bit
tivoli.tsm.loc.client.oracle.aix51.64bit.ela

TDP需要安装以上那些包。
1、安装后需要LN
ln -s /usr/lib/libobk64.a $ORACLE_HOME/lib/libobk.a

2、修改TDPO.OPT文件
3、配置密码文件:TDPOCONF PASSWORD 配置密码
4、SBTTEST TEST  测试TDP是否OK

论坛徽章:
0
7 [报告]
发表于 2005-11-23 11:19 |只看该作者

安装TDP

tivoli.tsm.client.api.64bit
tivoli.tsm.client.oracle.aix51.64bit
tivoli.tsm.client.oracle.tools.aix51.64bit
tivoli.tsm.loc.client.oracle.aix51.64bit.ela

TDP需要安装以上那些包。
1、安装后需要LN
ln -s /usr/lib/libobk64.a $ORACLE_HOME/lib/libobk.a

2、修改TDPO.OPT文件
3、配置密码文件:TDPOCONF PASSWORD 配置密码
4、SBTTEST TEST  测试TDP是否OK

论坛徽章:
0
8 [报告]
发表于 2005-11-23 11:23 |只看该作者

RMAN备份

在/ORACLE的目录下编辑RMAN 备份脚本DBBK.sh 相关内容如下:
#!/bin/ksh
export ORACLE_HOME=/oracle/app/oracle/product/9.2.0
export PATH=$ORACLE_HOME/binPATH
su - oracle -c 'rman target sys/change_on_install  nocatalog  cmdfile /oracle/fullbkdb.scr msglog /oracle/msglog.log'
  
  在DBBK的脚本中调用RMAN 的备份脚本相关内容如下:
run
{
configure controlfile autobackup on;
allocate channel t1 type 'sbt_tape' parms
'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
backup
full
format 'df_%t_%s_%p'
(database );
sql 'alter system archive log  current';
backup
format 'arch_%t_%s_%p.arc'
(archivelog from time 'sysdate-1' delete input );
release channel t1;
allocate channel d1 type disk;
copy current controlfile to '/arch/control/control.ctl';
release channel d1;
}
直接在系统中调用以上的脚本就可以实现对数据库的备份。

也可以有TSM SERVER定义策略调用定义的脚本!

论坛徽章:
0
9 [报告]
发表于 2005-11-23 11:24 |只看该作者

RMAN 恢复

测试sbttest test是否正常
一.拷贝控制文件到需要恢复的机器上上某处
二.修改pfile文件中关于控制文件的参数,使其指向所拷贝的控制文件
三. sqlplus /nolog
    connect /as sysdba
    startup nomount
四.rman target / nocatalog
    RMAN>run {
     allocate channel t1 type 'sbt_tape' parms
     'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo.opt)';
      restore controlfile to '/tmp/ctl01sb.ctl';
      release channel t1;
      allocate channel d1 type disk;
      replicate controlfile from '/tmp/ctl01sb.ctl';
      restore spfile;
      release channel d1;
       }
    RMAN>exit
五.sqlplus /nolog
   connect /as sysdba
   shutdown ....
   startup mount (可能需要指定spfile)
六.rman target / nocatalog
   RMAN>run {
     allocate channel t1 type 'sbt_tape' parms
     'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo.opt)';
restore database;
recover database;
      release channel t1;
      sql "alter database open resetlogs";
    }

论坛徽章:
0
10 [报告]
发表于 2005-11-23 11:30 |只看该作者

完成!关于CU 的一点感想

看CU已经好多年了,注册的号码都忘记好几个了,就是平时很少上CU上面写东西,不是不想贡献出一点东西,只是感觉在CU上面写东西太累!

一点不人性话,写的东西太多了要分好多次才能写完,以前写好的文档要贴上来,贴的速度太快系统提示我说:“请不要灌水”。气晕了!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP