tsm备份sqlserver.docx
《tsm备份sqlserver.docx》由会员分享,可在线阅读,更多相关《tsm备份sqlserver.docx(16页珍藏版)》请在冰豆网上搜索。
tsm备份sqlserver
SQLSEVER+TSM系统备份管理实施过程
1:
安装环境:
说明:
1.客户要求系统需要每天使用增量备份方式来备份其Sqlserver2000的数据库
2.安装过程需要举办齐全的软件(包括TivoliStorageManagerDataProtectionforSQLserver;TivoliStorageManagerV5.4clientforwindows;TivoliStorageManagerV5.4serverforwindows)
主机名
IP地址
系统版本
数据库版本
SQL服务器
10.8.48.24
Windowsserver2003
MicrosoftSQLServer2000
TSM服务器
10.8.48.167
Redhatlinux
2.实施过程:
Tsm配置部分:
1.下面是安装tsmserverv5.4forwindows
安装如下:
点击setup.exe
点击确定
点击安装产品
安装次序为1.安装TSM服务器,2.TSM服务器许可证.3.TSM语言包(可选.一般不选也可以).TSM设备驱动程序是有带库的时候需要额外安装
安装过程略………………………!
Step2.安装TivoliStorageManagerclientV5.4forwindows
(注:
使用TivoliStorageManagerclient管理server必须选择管理客户机命令行组件)
Step3.安装TivoliStorageManagerDataProtectionforSQLserver+安装语言包laguage,默认环境语言是chinese的!
按照之前安装server的方式安装TivoliStorageManagerDataProtectionforSQLserver
安装后在开始-程序中会看到TivoliStorageManager选项-选项里面有DataProtectionforSQLserver
Step4.配置TivoliStorageManagerclientV5.4forwindows客户端使用管理控制台管理TSMSERVER!
配置tsmclient使用GUI步骤如下:
进入程序-TivoliStorageManager-备份-归档GUI-选择SetupWizard
注意:
该名称一定要在tsmserver存在才可以连接
选择TCP/IP协议方式连接tsmserver端
填入tsmserver端的IP和端口
配置成功会有login界面进入
2.配置TivoliStorageManagerDataProtectionforSQLserver环境
tsmserver的环境已经配置好了,现在开始配置TivoliStorageManagerDataProtectionforSQLserver环境:
进入C:
\ProgramFiles\Tivoli\TSM\TDPSql目录下并找到tdpsql.exe文件,双击该文件出现如下画面(或者在程序里面找到sqlclientGUI)
上面的画面是tdpsql.exe的GUI备份管理器forsqlserver的
我们可以看到该画面显示的左边框中有一个TDP备份分支下面有一个SQLServer的图标
不难看出这个是可以手动备份SQLServer的工具!
在我们需要备份该数据库之前需要配置
Tdpsql.exe与tsmserver之间的联系,配置如下图:
鼠标点击编辑-然后配置;出现一个下面的对话框
常规配置我们在SQLServer:
填写SQLServer服务器对应的IP(注意:
如果用dns可以不填写)而从SQLServer:
填写SQLserver的对应的IP(注意:
如果用dns可以不填写)
我们点击性能
这里可以为tdpsql.exe和tsmserver之间的调优选项
这里的日志文件名称目录默认在C:
\ProgramFiles\Tivoli\TSM\TDPSql下的,我们可以在此目录看到tdpsql.exe所操作过的历史纪录以及报错信息
至于区域,我们语言这一项默认在中文的windowsserver系统是中文的就是中文语言,所以如果不安装语言包就会报错,如果报错最好还是选回english(EN)
自动化任务配置
.先设置好C:
\ProgramFiles\Tivoli\TSM\TDPSql\dsm.opt或者其实我们在图形界面配置tdpsql.exe的时候已经设置好了,
*======================================================================*
**
*IBMTivoliStorageManagerforDatabases*
**
*DataProtectionforMicrosoftSQLServer*
**
*SampleOptionsFile*
**
*======================================================================*
NODenamesqltest//改成你安装client的时候写的客户端的名称
CLUSTERnodeNO
PASSWORDAccessGenerate
*======================================================================*
*TCP/IPCommunicationOptions*
*======================================================================*
COMMMethodTCPip
TCPServeraddress10.8.48.164//tsm服务器不用更改
TCPPort1500
TCPWindowsize63
TCPBuffSize32
*======================================================================*
*NamedPipesCommunicationOptions*
*======================================================================*
*COMMMethodNAMEdpipe
*NAMedpipename\\.\pipe\tsmpipe
*======================================================================*
*-CompressionOptions*
**
*Usethe"COMPRESSION"optiontocompressthedatabeforesending*
*ittotheIBMTivoliStorageManagerserver.Usethe*
*"COMPRESSALWAYS"optiontospecifywhethertocontinuecompressing*
*thedataifitgrowsduringcompression.*
**
*======================================================================*
COMPRESSIonNO
*COMPRESSAlwaysNO
*======================================================================*
**
*-SchedulingOptions*
**
*Thedefaultschedulingmodeistheclientpollingmethod.*
*Touseserverpromptedscheduling,youmustbesuretouseatcp*
*clientportdifferentthantheoneusedbytheregularbackup*
*client.*
**
*======================================================================*
SCHEDMODEPolling
*SCHEDLOGRetention14
*SCHEDMODEPrompted
*TCPCLIENTADDRESSyy.yy.yy.yy
*TCPCLIENTPORT1502
*======================================================================*
*Include/ExcludeProcessing*
**
*Foramorecompletedescriptionofinclude/excludeprocessingrefer*
*totheDataProtectionforMicrosoftSQLServerInstallationand*
*User'sGuide.*
*======================================================================*
*======================================================================*
*Thefollowingincludestatementsassignallmetaobjectsto*
*managementclassSqlDbMetaMgmtClassandalldataobjectsto*
*SqlDbDataMgmtClass*
*======================================================================*
*INCLUDE"\...\meta\...\*"SqlDbMetaMgmtClass
*INCLUDE"\...\data\...\*"SqlDbDataMgmtClass
*======================================================================*
*Thefollowingincludestatementsassignalllogmetaobjectsto*
*managementclassSqlLogMetaMgmtClassandalllogdataobjectsto*
*SqlLogDataMgmtClass*
*======================================================================*
*INCLUDE"\...\meta\...\log*"SqlLogMetaMgmtClass
*INCLUDE"\...\data\...\log*"SqlLogDataMgmtClass
*======================================================================*
*Thefollowingexcludestatementsexcludealllogbackupsfor*
*databasesmasterandmsdb*
*======================================================================*
*EXCLUDE"\...\master\...\log*"
*EXCLUDE"\...\msdb\...\log*"
*======================================================================*
*Thefollowingexcludestatementexcludesthe"db1"database*
*frombeingcompressed(ifcompressionisenabledforbackups.)*
*======================================================================*
*EXCLUDE.COMPRESSION"\...\db1\...\*"
自动化备份设置
首先在C:
\ProgramFiles\Tivoli\TSM\TDPSql\salary_tzh001.smp创建这个文件用来备份SALARY_TZH001这个库,文件的内容如下:
@ECHOOFF
rem==================================================================
remsqlfull.smpsamplecommandfile
rem
remSamplecommandfilecontainingcommandstodoascheduledfull
rembackupofallSQLdatabasestoanIBMTivoliStorageManager
remserver.
rem
remThisfileismeanttobeexecutedbytheIBMTivoliStorage
remManagercentralschedulerinresponsetoadefinedscheduleon
remtheIBMTivoliStorageManagerserver.
rem
rem==================================================================
rem==================================================================
remReplace"C:
"withthedrivewhereDataProtectionforSQL
remisinstalled.Updatethedirectorytomatchtheinstallation
remdirectorythatyouchosewhenyouinstalledtheproduct.
rem==================================================================
setsql_dir=C:
\Progra~1\Tivoli\TSM\TDPSql
C:
cd%sql_dir%
rem==================================================================
remThetwolinesbelowputadate/timestampinalogfileforyou.
remNote:
Youcanchange"sqlsched.log"towhateveryoupreferin
remlinesbelow.
rem==================================================================
date>%sql_dir%\sqlsched.log
time>%sql_dir%\sqlsched.log
rem==================================================================
remNowcallthecommand-lineinterfacetodothebackup:
rem
remReplace"srvrname"withthenameoftheoptionsfilenameyou
remplantouse.
rem
remIfSQLauthenticationisbeingusedandtheSQLloginsettingshave
remnotbeenstoredviatheGUI,youmustalsospecifythe/sqluserand
rem/sqlpasswordoptionsonthecommandbelow.
rem
remInthisexample,weusethe'*'tobackupallofthedatabases
remontheSQLserver.Notethatdatabase'tempdb'willnot
rembebackedup.
rem
remNote:
Youcanchange"sqlsched.log"and"sqlfull.log"to
remwhateveryouprefer.
rem==================================================================
%sql_dir%\tdpsqlcbackupSALARY_TZH001full/tsmoptfile=%sql_dir%\dsm.opt/logfile=%sql_dir%\salarytzh001full.log>>%sql_dir%\sqlsched.log
其次拷贝salary_tzh001.smp变成salary_tzh001.bat。
双击就可以执行备份操作,可以查看salarytzh001.log查看备份的情况。
使用GUI备份操作
1.使用CLI备份SQLSERVER数据库
备份数据库可以使用GUI方式进行我们在左边大致看到SQLSERVER的结构,实例名称GZAGRI-APP包含有很多数据库,gzab是我们导入做测试的数据下面我们演示一下备份gzab
点击备份即可完成备份操作