rman数据验证(之restore validate)

验证rman备份是否有效

首先进入rman命令下执行:

1、  验证数据备份

restore  validate database;

2、  验证控制文件备份

restore  validate controlfile;

3、  验证参数文件备份

restore validate spfile;

 

自己编写脚本,定时执行验证

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

restore validate database;

exit

EOF

 

Rman全库0级压缩备份脚本记录一下自己备用)

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

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

 

 

感谢盖老师

http://www.eygle.com/archives/2010/01/rman_validate_backup.html

验证控制文件和参数文件:

RMAN> restore validate controlfile;

RMAN> restore validate spfile;

验证全备份一般会很慢,谨慎试验:

RMAN> restore validate database;

 

感谢杨廷琨老师

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

 

你可能感兴趣的:(rman数据验证(之restore validate))