当前位置:Gxlcms > 数据库问题 > 12c Oracle 定期验证备份文件

12c Oracle 定期验证备份文件

时间:2021-07-01 10:21:17 帮助过:8人阅读

数据库备份大家都知道,正常也会每天都定时备份,但是很少有人去做备份文件的验证。一旦,我们需要使用备份文件,备份文件确实损坏的那就悲催了。定期每个月做一次备份验证是必要的。
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> 

12c Oracle 定期验证备份文件

标签:pre   tab   com   starting   file   set   validate   llb   auto   

人气教程排行