Re: no data in the tables from logical log restore [renamed]
Posted in 2010
You don't have to do that. You can use archecker to extract the dropped
table from the archive and the following logs right up to the instant it was
dropped (you can have archecker process the 8th log in other words) and
insert the data into a table.
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
IIUG Board of Directors (art@iiug.org)
See you at the 2010 IIUG Informix Conference
April 25-28, 2010
Overland Park (Kansas City), KS
www.iiug.org/conf
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
organization with which I am associated either explicitly, implicitly, or by
inference. Neither do those opinions reflect those of other individuals
affiliated with any entity with which I am affiliated nor those of the
entities themselves.
On Sat, Feb 6, 2010 at 4:11 PM, Aleksander Kamenik <
aleksander@krediidiinfo.ee> wrote:
> On 02/04/2010 02:04 PM, theBP wrote:
>
> > Take a backup :
> >
> > ontape -s -L 0 -t STDIO | gzip -c> ontape.gz
> ...
> > ontape -a>
> On the main server this is done automatically. I have the nightly L0 as
> well as 7 about 100MB sized logical log files. I need to restore to a
> state before a table was dropped mid day. So I have seven logs to
> restore after the level zero to get most of the lost data back. The
> eighth log would contain the drop statement (I'll get to archecker later).
>
> So I'm restoring onto a another server. No ER or HDR involved whatsoever.
>
> > For the restore (engine offline) :
> >
> > gunzip the file to STDIO and pipe it to ontape, doing a physical only
> restore :
> >
> > gunzip -c ontape.gz | ontape -p -t STDIO
>
> Right, I used -r instead of -p. -r put the server into quiescent from
> fast recovery. -p doesn't. Thanks!
>
> (Though I have to wonder, is it even possible to restore a level 1
> backup when you're using STDIO for the level zero restore? There's no
> switch in ontape for level 1 like there's for logical logs.)
>
> > Now to the logical restore :
> >
> > ontape -l>
> All good. Restored the 7 logical logs.
>
> > Now bring the engine online :
> > onmode -m>
> Done.
>
> The online.log says the logs were applied and lots of checkpoints were
> done. In ISA I can see the 7 logical logs are there and a new one was
> started.
>
>
> And here's the really weird thing. I don't see any changes in the tables
> that were supposed to come from the logical logs. The tables are the
> same as if they would have been after the L0 restore without any further
> logical log restores.
>
>
> I'm sure I'm looking at the correct database as well as tables. When I
> check the production server (where the backups were taken) I can see
> changes from that time period. But on the restored server they go only
> up to the level zero backup. As if I hadn't applied any logs.
>
>
> The logical logs are timestamped in the file name additionally to the
> log sequence number. Also the logs would not apply if they were the
> wrong ones or if I fed them to ontape in the wrong order.
>
> Even if by magic the timestamps had drifted into the future, there's
> 700MB of logical logs which data doesn't show up even in popular tables.
> And btw the servers use ntp to keep time.
>
>
> I'm positive that the logs did not apply or the data was not there to
> begin with. But the files are there, they're unique (different md5sums),
> correct size and contain correctly numbered logical log files (otherwise
> ontape would not accept them).
>
>
> I also tried applying the logs after the L0 restore one by one using
> continuous restore (7 times ontape -l -C and once ontape -l -X). Same
> result.
>
>
> So what could possibly be the reason that the logical log restores don't
> apply to the tables, but are apparently written to the logical log.
>
>
> I can't help but think that I'm doing something very stupid. And
> probably I am, but I can't figure out what.
>
>
> This is 11.50.UC6 without the .W1 sysmaster rebuild. Could this be
> what's causing problem?
>
>
>
> I should also mention that I tried to restore the table from the L0 and
> logical logs with archecker. No problem with the L0, however no luck
> with the logical logs.
>
> archecker just hangs there, doing nothing. So maybe it is the log files
> that are corrupt? I couldn't figure out how to make archecker verify the
> files either, again, it would do pretty much nothing.
>
> The 'stage' does nothing and 'apply' doesn't have anything to apply.
> Though maybe archecker does not work be cause of the old/broken
> sysmaster database?
>
> I have to admit too that I've never used archecker before.
>
>
>
>
> Any ideas appreciated.
>
> Regards,
>
> --
>
> Aleksander Kamenik
> System Administrator
> Krediidiinfo AS
> an Experian Company
> Phone: +372 665 9649
> Email: aleksander@krediidiinfo.ee
>
> http://www.krediidiinfo.ee/
> http://www.experiangroup.com/
> _______________________________________________
> Informix-list mailing list
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list
>