Re: no data in the tables from logical log restore [renamed]



Aleksander Kamenik 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,


Are you sure your tables are in a logged database? Probably a stupid suggestion, but for now it's the only one that poped up...

Regards.
.



Relevant Pages

  • RE: Checking database partition index... FAILED
    ... When doing a physical restore. ... recovery and it came up in a few seconds short of 30 minutes. ... with use about 5 20MByte logical logs per day. ... 3- The engine was in recovery mode. ...
    (comp.databases.informix)
  • Re: Backup & Restore confusion
    ... When you restore you want to restore ... your logical logs so you can restore the server state to as close to ... recovery before you shutdown the engine. ... Please label this tape as number 1 in the arc tape sequence. ...
    (comp.databases.informix)
  • no data in the tables from logical log restore [renamed]
    ... On the main server this is done automatically. ... So I have seven logs to restore after the level zero to get most of the lost data back. ... I don't see any changes in the tables that were supposed to come from the logical logs. ... I should also mention that I tried to restore the table from the L0 and logical logs with archecker. ...
    (comp.databases.informix)
  • Re: STDIO L0 restore plus logical log restore with ontape
    ... I need to restore a gzipped ifx level zero backup pluss some logical logs. ... So I want to use STDIO and interactive ontape to restore the logs. ...
    (comp.databases.informix)
  • Re: Recovering individual dbspaces
    ... This is possible only with so called non-critical dbspaces, ... When doing a warmrestore, you have torestorethedbspaceto the current time, so that it will be consistent with the ... logical logs and applying those log records that are involved with therestoredbspace. ... if i made a level 0 backup on sunday and try to warm restore next ...
    (comp.databases.informix)