Re: Informix Online Table Recovery: How?
Posted in 1996
John Eichelberger wrote:
>
> Scenario: A user has accidentally removed 20 rows from a table and needs
> to get them back. You are running Informix Online 7.12 with raw partitions
> (not cooked files).
>
> Question: How?
>
> Informix's suggestion was:
> (1) Save your whole db to a tape (I would be using level-0 onarchive).
> (2) Restore an archive that had the 20 rows that were lost.
> (3) Unload the 20 rows.
> (4) Restore the db you just dumped to tape.
>
> There has to be an easier way. Basically, what I am looking for is the
> ability to restore a single table, under a different name if possible.
>
> In Informix-SE with cooked files we would do the following:
> (1) Get a dbschema of the table currently in the database (e.g., realtab).
> (2) Change the name of the table (e.g., faketab) on the dbschema output file.
> (3) Create the table realtab using the dbschema's sql.
> (4) Restore the realtab.dat and realtab.idx file from a backup tape of the
> db to a scratch directory.
> (5) Rename (in a different directory) the realtab.dat and realtab.idx
> to faketab.dat and faketab.idx.
> (6) Move faketab.??? to the db directory and run bcheck on it.
> (7) Extract the data we want from faketab and put into realtab.
> (8) Drop faketab.
>
> So what about Online with raw partitions?
>
> Thanks.
>
> Jon Eichelberger
> P.S. Please don't tell me about something in a future release of Online.
This is maybe a symptom of how bad the problem is and not much use to you
now but in the past I've used a scheme of unloading the database a table
at a time and compressing the onloads onto an optical disk which was
then backed up. This was done over a weekly cycle. It meant that the
missing rows could be extracted from the optical and re-loaded. If, of
course, they were created and deleted in the interval between successive
unloads you were still screwed. It helped a little, however.
Ian