rman備份驗證(之restore validate)

murkey發表於2014-10-31

驗證rman備份是否有效

首先進入rman命令下執行:

1、  驗證資料備份

restore  validate database;

2、  驗證控制檔案備份

restore  validate controlfile;

3、  驗證引數檔案備份

restore validate spfile;

 

自己編寫指令碼,定時執行驗證

rman target /  nocatalog log=/rman/validate/rman_db_validate.log<

restore validate database;

exit

EOF

 

Rman全庫0級壓縮備份指令碼 記錄一下自己備用)

rman target /  nocatalog log=/rman/log/rman_db_level0.log <

run {

allocate channel d1 type disk;

allocate channel d2 type disk;

allocate channel d3 type disk;

backup as compressed backupset incremental level 0 database filesperset 4 format

'/rman/data/level0_%d_%s_%p_%u_%T.bak' include current controlfile;

sql 'alter system archive log current';

backup archivelog all filesperset 10 format '/rman/arch/arc_%d_%s_%p_%u_%T.bak'

delete all input;

release channel d1;

release channel d2;

release channel d3;

crosscheck backup;

delete noprompt expired backup;

delete noprompt obsolete;

}

exit

EOF

 

 

感謝蓋老師

驗證控制檔案和引數檔案:

RMAN> restore validate controlfile;

RMAN> restore validate spfile;

驗證全備份一般會很慢,謹慎試驗:

RMAN> restore validate database;

 

感謝楊廷琨老師

http://space.itpub.net/4227/viewspace-69115

 

 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/500314/viewspace-1315477/,如需轉載,請註明出處,否則將追究法律責任。

相關文章