ITPub博客

首页 > Linux操作系统 > Linux操作系统 > rman备份验证(之restore validate)

rman备份验证(之restore validate)

Linux操作系统 作者:murkey 时间:2014-10-31 09:27:05 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/500314/viewspace-1315477/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-07-29

  • 博文量
    137
  • 访问量
    558562