ITPub博客

首页 > 数据库 > Oracle > rman备份验证(之restore validate)

rman备份验证(之restore validate)

原创 Oracle 作者:lovehewenyu 时间:2012-08-07 10:52:11 0 删除 编辑

验证 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

 

 

感谢盖老师

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

 

 

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26442936/viewspace-740209/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
10年金融行业老鸟。Oracle,Mysql,PostgreSQL,EMC 存储,NBU备份。微信/电话 18211103995

注册时间:2012-02-03

  • 博文量
    307
  • 访问量
    1528499