tsm有用的命令總結
define library FileLib libtype=file share=yes
DEFINE DEVCLASS tsmdev DEVTYPE=FILE MAXCAPACITY=2G DIRECTORY=/tsmpool shared=yes mountlimit=20 library=filelib
update devclass tsmdev library=filelib
DEFINE STGPOOL stg_ora tsmdev ACCESS=READWRITE COLLOCATE=NO MAXSCRATCH=20 REUSEDELAY=0 DATAFORMAT=NATIVE
define domain oradomain
define policyset oradomain orapolicy
define mgmtclass oradomain orapolicy oramgmt
define copygroup oradomain orapolicy oramgmt standard destination=stg_ora verexist=1 verdelete=0 retextra=0 retonly=0 mode=absolute
assign defmgmtclass oradomain orapolicy oramgmt
activate policyset oradomain orapolicy
register node CLIENT1 admin backdel=yes compress=yes domain=oradomain
Update node CLIENT1 domain=oradomain archdelete=yes backdelete=yes
define vol STG_ORA /tsmpool/vol01.dsm formatsize=200
DEFINE VOLUME stg_ora vol01.dsm ACCESS=READWRITE
update node 'CLIENT1' MAXNUMMP= 1000
update devclass tsmdev mountlimit=10
EXPIRE INVENTORY
reclaim stgpool orapool
SPACE RECLAMATION
backup db devclass=tsm_dbbak type=full
grant authority admin classes=system
(2) 快速重複利用
如果用 q content命令檢視某盤磁帶上的備份內容後,認為這些備份資料都可以刪除了,我們就能快速清空這盤磁帶,使它可以被重複利用。
delete vol 00000002.BFS discarddata=yes
delete backup /dbbak/dbbak/ * -deltype=all -noprompt
--=======================
update copygroup oradomain ORAPOLICYSET ORAMGMTCLASS VERExists=1 VERDeleted=0 RETExtra=0 RETOnly=0
--=======================
DEFINE DEVCLASS tsm_dbbak DEVTYPE=FILE DIR=/tsmdbbak MOUNTLIMIT=10 MAXCAP=100m SHARED=no library=filelib
define stgpool backuppool tsm_dbbak MAXSCRatch=100
define schedule tsmdbbak type=administrative cmd="backup db devclass=tsm_dbbak type=full" active=yes starttime=13:30 period=1
--===========================
29.
顯示某個節點所有備份檔案的版本資訊
dsmadmc:
select * from backups where node_name='CLIENT1'
select * from backups where node_name='ORA_CLIENT' and filespace_name='/dbbak' and ll_name='1_27169_718202824.dbf'
select ll_name from backups where node_name='ORA_CLIENT' and filespace_name='/dbbak' and state='INACTIVE_VERSION'
select state,count(*) from backups where node_name='ORA_CLIENT' and filespace_name='/dbbak' group by state
select state,ll_name,count(*) from backups where node_name='ORA_CLIENT' and filespace_name='/dbbak' group by state,ll_name
可以使用SQL語句對TSM自身的DB進行查詢。
--===========================
備份:
tsm: >backup db type=full devclass=tsm_dbbak
備份資料寫到定義的裝置類當中。因為在定義檔案裝置類時需要指定檔案目錄,所以,DB
備份時將會寫入該指定的資料夾中。還可以指定具體備份到哪一卷,但是不能使用儲存池。因為一旦資料庫損壞,是無法識別儲存池的。
恢復:
1. 重新安裝
tsm server
2.
將備份的最新的tsm的db、log和dsmserv.opt dsmserv.dsk, dsm.sys, dsm.opt devcnfg.out, volhist.out
配置檔案複製回原來位置
3.
在/usr/Tivoli/tsm/server/bin下執行dsmserv命令:
dsmserv restore db devclass=filedev2 vol=95362738.dbf commit=yes
在進行資料庫恢復時,若備份時採用的是檔案裝置類,此時需提前定義相同名字的檔案裝置類,並且要與原類定義時指
向同一資料夾。
--=========================
如何刪除tsm db自身備份:
delete volhistory todate=today totime=now type=dbb
delete volhistory tpye=dbbackup todate=06/13/2014
delete volhistory type=dbb todate=06/14/2014 totime=13:30:22
--=========================
如何定義client端schedule:
define schedule oradomain client_dbbak type=client action=command objects="/home/oracle/dbbak/dbbak.sh" starttime=13:10 dayofweek=any
define sche MYSCHEDULE zlinux_hour act=command bjects="/opt/tivoli/tsm/client/domino/bin64/domdsmc_lotus0/domsel.sh" duration=3 durunits=minutes period=2 perunits=hour startt=now
DEFine ASSOCiation oradomain client_dbbak CLIENT1
update schedule oradomain client_dbbak starttime=20:50
--====================================
VERExists
Specifies the maximum number of backup versions to retain for files that are currently on the client file system. This parameter is optional.
If an incremental backup causes the limit to be exceeded, the server expires the oldest backup version that exists in server storage. Possible values are:
number
Specifies the number of backup versions to retain for files that are currently on the client file system. You can specify an integer from 1 to 9999.
NOLimit
Specifies that you want the server to retain all backup versions.
The number of backup versions to retain is controlled by this parameter until versions exceed the retention time specified by the RETEXTRA parameter.
VERDeleted
Specifies the maximum number of backup versions to retain for files that have been deleted from the client file system after being backed up using the server. This parameter is optional.
If a user deletes a file from the client file system, the next incremental backup causes the server to change the active backup version of the file to inactive and expire the oldest versions in excess of this number. The expiration date for the remaining versions is determined by the retention time specified by the RETEXTRA or RETONLY parameter. Possible values are:
number
Specifies the number of backup versions to retain for files that are deleted from the client file system after being backed up. You can specify a value from 0 to 9999.
NOLimit
Specifies that you want the server to retain all backup versions for files that are deleted from the client file system after being backed up.
RETExtra
Specifies the number of days that the server retains a backup version after that version becomes inactive. A version of a file becomes inactive when the client stores a more recent backup version, or when the client deletes the file from the workstation and then runs a full incremental backup. The server deletes inactive versions based on retention time even if the number of inactive versions does not exceed the number allowed by the VEREXISTS or VERDELETED parameters. This parameter is optional. Possible values are:
days
Specifies the number of days to retain inactive backup versions. You can specify an integer from 0 to 9999.
NOLimit
Specifies that you want to retain inactive backup versions indefinitely.
If you specify NOLIMIT, the server deletes extra backup versions based on the VEREXISTS parameter (when the file still exists on the client file system) or the VERDELETED parameter (when the file no longer exists on the client file system).
RETOnly
Specifies the number of days to retain the last backup version of a file that has been deleted from the client file system. This parameter is optional. Possible values are:
days
Specifies the number of days to retain the last remaining inactive copy of a file. You can specify an integer from 0 to 9999.
NOLimit
Specifies that you want to keep the last remaining inactive version of a file indefinitely.
If you specify NOLIMIT, the server retains the last remaining backup version forever, unless a user or administrator deletes the file from server storage.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31344955/viewspace-2103405/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 大佬有用的面經總結
- adb用到的命令總結
- Linux命令總結--mkdir命令Linux
- pip 命令總結
- VIM 命令總結
- adb命令總結
- NPM 命令總結NPM
- docker命令總結Docker
- linux命令總結Linux
- redis命令總結Redis
- git命令總結Git
- 很有用的 GCC 命令列選項GC命令列
- 有用 AT 命令測試過晶片的嗎?晶片
- jq命令用法總結
- 常用git命令總結Git
- docker命令總結(二)Docker
- Linux命令總結大全Linux
- Linux shell命令總結Linux
- 常用kubectl命令總結
- 自用ssh命令總結
- artisan 命令使用總結
- Linux命令大全總結Linux
- Enum列舉型別實戰總結,保證有用!型別
- 非常有用的Linux系統操作命令Linux
- 20 個有用的 Go 語言微服務開發框架吐血總結!!!Go微服務框架
- oracle基本命令總結Oracle
- Linux 命令總結之 topLinux
- CentOS 7 systemctl 命令總結CentOS
- RMAN命令LIST操作總結
- Git實戰命令總結Git
- github使用命令總結Github
- python學習命令總結Python
- 一些有用的連結
- 在 Linux 下 9 個有用的 touch 命令示例Linux
- windbg 常用除錯命令總結除錯
- Linux常用命令總結Linux
- docker常用命令總結Docker
- linux 新手必會命令總結Linux
- Docker 常用命令總結Docker