How do I handle an I/O error when restoring an RMAN backup?
-
I'm using Oracle XE i.e. a subset of 11.2 version. I have below archivelogs folders having one or multiple archivelog files.
2022-05-20, 2022-05-21, 2022-05-22, 2022-05-25, 2022-05-26, 2022-05-27, 2022-05-30
I took a full backup plus archivelog on 30th may. Now I manually corrupted archivelog files of 2022-05-26. After that when I issue -
crosscheck archivelog all
RMAN returns this error:RMAN-03009: failure of crosscheck command on ORA_DISK_1 channel at 05/30/2022 21:11:10 ORA-19587: error occurred reading 512 bytes at block number 1 ORA-27069: attempt to do I/O beyond the range of the file OSD-04026: Invalid parameter passed. O/S-Error: (OS 1) Incorrect function.
when I issue -
restore archivelog all
I'm still getting this error but I thought I would be able to restore as I have already taken backup of archivelog before the corruption.RMAN> restore archivelog all; restore archivelog all; Starting restore at 30-MAY-22 using channel ORA_DISK_1 RMAN-03002: failure of restore command at 05/30/2022 21:02:15 ORA-19587: error occurred reading 512 bytes at block number 1 ORA-27069: attempt to do I/O beyond the range of the file OSD-04026: Invalid parameter passed. O/S-Error: (OS 1) Incorrect function.
When I issue
rman> restore database
the same error occurs. Can anyone please suggest the solution?
-
A restore command checks if it can skip the restore of a file that is on disk already. Meaning, your restore command first checks and validates the archivelog it believes to be there, but unable to do so because that file was corrupted.
The solution is quite simple, just move/delete the archivelog you made corrupt, optionally try to crosscheck the archivelog in RMAN, then retry the restore.