数据库备份大家都知道,正常也会每天都定时备份,但是很少有人去做备份文件的验证。一旦,我们需要使用备份文件,备份文件确实损坏的那就悲催了。定期每个月做一次备份验证是必要的。
RMAN> restore database validate;
Starting restore at 12-JAN-2018 21:49:31
using channel ORA_DISK_1
channel ORA_DISK_1: starting validation of datafile backup set
channel ORA_DISK_1: reading from backup piece /u01/bak/db_fullbk_19_1_965249636.rmn
channel ORA_DISK_1: piece handle=/u01/bak/db_fullbk_19_1_965249636.rmn tag=BACKUP_FULL
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting validation of datafile backup set
channel ORA_DISK_1: reading from backup piece /u01/bak/db_fullbk_18_1_965249636.rmn
channel ORA_DISK_1: piece handle=/u01/bak/db_fullbk_18_1_965249636.rmn tag=BACKUP_FULL
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting validation of datafile backup set
channel ORA_DISK_1: reading from backup piece /u01/bak/db_fullbk_17_1_965249636.rmn
channel ORA_DISK_1: piece handle=/u01/bak/db_fullbk_17_1_965249636.rmn tag=BACKUP_FULL
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:55
Finished restore at 12-JAN-2018 21:51:02
RMAN>
RMAN> restore archivelog from time 'sysdate-1' validate;
Starting restore at 12-JAN-2018 21:59:39
using channel ORA_DISK_1
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece /u01/bak/archive_24_1_965249706.arc
channel ORA_DISK_1: piece handle=/u01/bak/archive_24_1_965249706.arc tag=TAG20180112T205505
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece /u01/bak/archive_22_1_965249706.arc
channel ORA_DISK_1: piece handle=/u01/bak/archive_22_1_965249706.arc tag=TAG20180112T205505
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece /u01/bak/archive_23_1_965249706.arc
channel ORA_DISK_1: piece handle=/u01/bak/archive_23_1_965249706.arc tag=TAG20180112T205505
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece /u01/bak/archive_21_1_965249706.arc
channel ORA_DISK_1: piece handle=/u01/bak/archive_21_1_965249706.arc tag=TAG20180112T205505
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece /u01/bak/archive_25_1_965249717.arc
channel ORA_DISK_1: piece handle=/u01/bak/archive_25_1_965249717.arc tag=TAG20180112T205505
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece /u01/bak/archive_35_1_965253442.arc
channel ORA_DISK_1: piece handle=/u01/bak/archive_35_1_965253442.arc tag=TAG20180112T215722
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:00
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece /u01/bak/archive_34_1_965253442.arc
channel ORA_DISK_1: piece handle=/u01/bak/archive_34_1_965253442.arc tag=TAG20180112T215722
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:00
Finished restore at 12-JAN-2018 21:59:50
RMAN> restore controlfile validate;
Starting restore at 12-JAN-2018 21:54:47
using channel ORA_DISK_1
channel ORA_DISK_1: starting validation of datafile backup set
channel ORA_DISK_1: reading from backup piece +DATADG/ORCL/AUTOBACKUP/2018_01_12/s_965249725.381.965249727
channel ORA_DISK_1: piece handle=+DATADG/ORCL/AUTOBACKUP/2018_01_12/s_965249725.381.965249727 tag=TAG20180112T205525
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
Finished restore at 12-JAN-2018 21:54:48
RMAN> restore spfile validate;
Starting restore at 12-JAN-2018 21:54:57
using channel ORA_DISK_1
channel ORA_DISK_1: starting validation of datafile backup set
channel ORA_DISK_1: reading from backup piece +DATADG/ORCL/AUTOBACKUP/2018_01_12/s_965249725.381.965249727
channel ORA_DISK_1: piece handle=+DATADG/ORCL/AUTOBACKUP/2018_01_12/s_965249725.381.965249727 tag=TAG20180112T205525
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
Finished restore at 12-JAN-2018 21:54:58
RMAN>
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341