RMAN 中change backupset unavailable 測試和相關命令用法
要比這個更早點的備份集來恢復,那就可以用到change 某個備份集不可用了
具體還是看業務需要
以下是測試過程
PHP code:
RMAN> change backupset 96,97 unavailable;
changed backup piece unavailable
backup piece handle=D:BACKUP34JI2ROR_1_1 recid=96 stamp=656502555
changed backup piece unavailable
backup piece handle=D:BACKUPC-799229701-20080604-03 recid=97 stamp=656502580
Changed 2 objects to UNAVAILABLE status
RMAN> list backup summary;
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Tag
------- -- -- - ----------- --------------- ------- ------- ---
94 B F A DISK 04-JUN-08 1 1 TAG20080604T094245
95 B F A DISK 04-JUN-08 1 1
96 B F U DISK 04-JUN-08 1 1 TAG20080604T094915
97 B F U DISK 04-JUN-08 1 1
RMAN> exit
狀態U 表示不可用
Recovery Manager complete.
RMAN> startup nomount;
Oracle instance started
Total System Global Area 101785012 bytes
Fixed Size 454068 bytes
Variable Size 75497472 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
RMAN> alter database mount;
database mounted
RMAN> restore database;
Starting restore at 04-JUN-08
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to D:ORACLEORADATAPUBTESTSYSTEM01.DBF
restoring datafile 00002 to D:ORACLEORADATAPUBTESTUNDOTBS01.DBF
restoring datafile 00003 to D:ORACLEORADATAPUBTESTEXAMPLE01.DBF
restoring datafile 00004 to D:ORACLEORADATAPUBTESTINDX01.DBF
restoring datafile 00005 to D:ORACLEORADATAPUBTESTTOOLS01.DBF
restoring datafile 00006 to D:ORACLEORADATAPUBTESTUSERS01.DBF
channel ORA_DISK_1: restored backup piece 1
piece handle=D:BACKUP32JI2RCM_1_1 tag=TAG20080604T094245 params=NULL
channel ORA_DISK_1: restore complete
Finished restore at 04-JUN-08
與可用的tag 備份集名一致
RMAN> recover database;
Starting recover at 04-JUN-08
using channel ORA_DISK_1
starting media recovery
media recovery complete
Finished recover at 04-JUN-08
RMAN> alter database open;
database opened
RMAN>
1. list backup of database;
2. change backupset 2 keep forever logs; --備份集2不受冗餘策略的影響永遠有效()
change backupset 2 keep until time 'sysdate+7' logs; --備份集2不受冗餘策略的影響在超出正常日期7天內有效
change backupset 2 nokeep; --變更備份集2為廢棄狀態(為無效狀態可以用delete obsete來刪除)
3. delete obsolete; --刪除所有無效的備份集4. backup database keep forever;
backup database keep unitl time "to_date('01/01/05','mm/dd/yy')";
backup database keep 5 days;
5. change backup of database tag='whole_db' unavailable;
change backup of database like '%GOLD%' unavailable;
change backupset 2 unavailable;
change backupset 2 available;
change archivelog '/cfs01/oradata/archive/2_8.log' unavailable;
change archivelog all backed up 5 times to device type disk unavailable;
change backup of database device type disk unavailable;change backupset 2,3 delete; --刪除指定的備份集(物理刪除備份檔案)
change backuppiece 3 delete; --刪除備份片3(物理刪除備份檔案)
change archivelog until logseq=3 thead=1 delete;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7199859/viewspace-331140/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- RMAN備份中的通道(CHANNEL)相關 - PARALLELISM 、FILESPERSETParallel
- RMAN 備份相關的概念
- MySQL change buffer介紹和相關引數調整建議MySql
- CentOS 中 iptables 和 firewall 防火牆的相關命令CentOS防火牆
- MySQL中的binlog相關命令和恢復技巧MySql
- 想問問各位 app 測試 adb 命令相關的東西APP
- Python測試框架pytest命令列引數用法Python框架命令列
- Git命令的使用和相關配置Git
- Oracle RMAN恢復測試Oracle
- 壓力測試相關指標指標
- oracle鎖級別相關測試Oracle
- nodeJS---URL相關模組用法(url和querystring)NodeJS
- RMAN中的 debug調式命令
- BGP相關命令
- Oracle相關命令Oracle
- vagrant 相關命令
- Composer 相關命令
- Vim相關命令
- chmod命令(change mode)
- Oracle rman duplicate遷移測試Oracle
- Python容器相關簡單效能測試Python
- junit 測試中各種斷言用法
- adb Gradle相關命令Gradle
- 相關dos命令合集
- AIX相關管理命令AI
- pip 相關命令操作
- Linux 核心相關命令Linux
- 【hadoop/Spark】相關命令HadoopSpark
- iptables刪除命令中的相關問題
- RMAN備份相關知識與技能總結
- RMAN備份與恢復測試
- Linux入門_基礎命令_使用者和組相關命令Linux
- 初次接觸測試模型相關,請教測試過程中應該注意的內容模型
- 大資料測試 - 相關性評估大資料
- AIX中PV,VG,LV及FS常用相關命令AI
- Linux網路相關命令Linux
- Linux 、docker 、nginx 相關命令LinuxDockerNginx
- mvn 相關命令彙總
- 【linux】命令-網路相關Linux