Re: Rolling forward logical logs
Posted in 1997
Topics: Backup & Restore, Logging & Checkpoints
Neil Truby wrote:
>
> Suppose I take an archive at 0300. At 0900 the users tell me that an
> application error has occurred, and the wish to have the database
> restored to its state at or before 0600. I interrogate the online.log
> and note that in between 0300 and 0900 logs 1-10 have been completed,
> and have been backed up using continuous logging. Log 6 completed at
> 0555.
>
> How would I roll-forward, after restore, applying the changes contained
> only in logs 1-6, stopping at the end of 6 and disregarding 7-10?
>
> Thanks
>
> Neil Truby
Hi Neil,
I think "in-time-recovery" is a feature of "onbar".
For pre-7.21 and 5.x versions I've developed
a special program for "ontape" to perform such a rollforward of
logical logs, but it's not easy to use this program. Therefore
here's just a description how to do this recovery.
If you know the size of your logical logs on disk, you can
calculate the number of pages on your log tape, that you want to
retrieve. Simply copy these pages to a cooked file or raw device
by "dd".
dd if=/dev/tapedevice of=/yourcopy bs=32k count=number_of_32k_blocks
Afterwards you can view your copy by "onlog -l -d /yourcopy".
If you want to recover only these logs, change the LTAPEDEV
configuration parameter to /yourcopy and perform the restore.
( I did a rollforward to a specific logical log page instead of a
complete log file. It works great. )
Bye
Stefan