数据都已经解压完毕。 在/orabak/oracle_bak 下
但恢复时读取备份片总是报错
channel dev1: reading from backup piece/orabak/oracle_bak/fullrac_EPTDB_820_1_20130802
ORA-19870: error reading backup piece/orabak/oracle_bak/fullrac_EPTDB_821_1_20130802
ORA-19587: error occurred reading 0 bytesat block number 1
ORA-27091: unable to queue I/O
ORA-27067: size of I/O buffer is invalid
Additional information: 2
ORA-19870: error reading backup piece/orabak/oracle_bak/fullrac_EPTDB_820_1_20130802
ORA-19587: error occurred reading 0 bytesat block number 1
ORA-27091: unable to queue I/O
ORA-27067: size of I/O buffer is invalid
Additional information: 2
系统日志中也可以看到
Fri Aug 9 00:30:04 2013
Corrupt block 1 found during reading backuppiece, file=/orabak/oracle_bak/fullrac_EPTDB_820_1_20130802, corr_type=1
Fri Aug 9 00:30:41 2013
Corrupt block 1 found during reading backuppiece, file=/orabak/oracle_bak/fullrac_EPTDB_819_1_20130802, corr_type=1
Fri Aug 9 00:30:41 2013
确认传输过程中没有问题。
似乎在这台机器上,RMAN没有办法正确读取备份片。。。
晕了。
我第一反应是备份集的问题,于是去备份目录下看了下。
-r--r--r-- 1 oracle oinstall 20611072 Aug 08 16:41 ctl_EPTDB_824_1_20130802
-r--r--r-- 1 oracle oinstall 21474836480 Aug 08 16:42 fullrac_EPTDB_818_1_20130802
-r--r--r-- 1 oracle oinstall 21474836480 Aug 08 16:45 fullrac_EPTDB_818_2_20130802
--都是只读权限,我觉得有问题,可想了下,rman备份是读取备份集,不用写应该不造成什么影响吧,但想是这么想,总觉得怪怪的。
RMAN restore of read only backuppieces fails as follows:
.
The backuppiece is in read only status at the operating system level.
Make the RMAN backuppiece not only readable but also writable. See Bug 5412531 for other details.
--确实需要写的权限!
经过修改权限后,进行验证就不会报错了。
cd/orabak/oracle_bak
chmod775 *20130802
RMAN>restore controlfile validate;
Startingrestore at 09-AUG-13
usingchannel ORA_DISK_1
channelORA_DISK_1: starting validation of datafile backupset
channelORA_DISK_1: reading from backup piece/orabak/oracle_bak/ctl_EPTDB_824_1_20130802
channelORA_DISK_1: restored backup piece 1
piecehandle=/orabak/oracle_bak/ctl_EPTDB_824_1_20130802 tag=TAG20130802T210600
channelORA_DISK_1: validation complete, elapsed time: 00:00:02
Finishedrestore at 09-AUG-13
之后的恢复也没有问题。
注意:中间恢复失败,或者手工停止后,要将rman相关进程杀干净再重新恢复,否则后面会有问题。说不定在第二次恢复过程中,第一次的进程才停止,然后把相关文件删除,其实删除的是第二次才恢复的文件(因为文件名相同)。