Unix Technical Forum

ontape -l roll-forward of many logs

This is a discussion on ontape -l roll-forward of many logs within the Informix forums, part of the Database Server Software category; --> IDS v7.31 UD8 on solaris I'm doing a logical log rollforward. The logs are backed up by an ontape ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 12:57 PM
Neil Truby
 
Posts: n/a
Default ontape -l roll-forward of many logs

IDS v7.31 UD8 on solaris

I'm doing a logical log rollforward. The logs are backed up by an ontape -a
process, to disk, and are about 10m each in size.

It's all working fine if i roll forward one log then in a seprate screen
move the next one into position. But this is a pain in the arse: I have
hundreds to do and want to do them in one fell swoop.

But if I cat all 100 into one large file ontape bombs out almost immediately
asking if I have more logs. Similarly if I run onlog on the 1concatenation
of 100 logs it reads just the first one and ask me if I have any more.

Why is this happening? I've changed LTAPESIZE in the ONCONFIG file on the
restored server from 10m to 2g but it's made no difference.

SOMETHING is teling ontape/onlog to read only the first 10m of the
concatenated file. But what?!

Thx

Neil


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2008, 12:57 PM
Paul Watson
 
Posts: n/a
Default Re: ontape -l roll-forward of many logs

You can not just cat the files together for patently obvious reasons,
i.e. each log file has it's own individual header

It is trivial to script the process though

Paul Watson
Tel: +44 1414161772
Mob: +44 7818003457
Web: www.oninit.com

GO FURTHER with DB2
GET THERE FASTER with Informix.
Attend the IDUG 2006 European Conference.
Vienna, Austria. 2-6 October 2006
Visit http://www.iiug.org/conf for more information.




> -----Original Message-----
> From: Neil Truby [mailto:neil.truby@ardenta.com]
> Posted At: 01 September 2006 16:14
> Posted To: comp.databases.informix
> Conversation: ontape -l roll-forward of many logs
> Subject: ontape -l roll-forward of many logs
>
>
> IDS v7.31 UD8 on solaris
>
> I'm doing a logical log rollforward. The logs are backed up
> by an ontape -a process, to disk, and are about 10m each in size.
>
> It's all working fine if i roll forward one log then in a
> seprate screen move the next one into position. But this is
> a pain in the arse: I have hundreds to do and want to do them
> in one fell swoop.
>
> But if I cat all 100 into one large file ontape bombs out
> almost immediately asking if I have more logs. Similarly if
> I run onlog on the 1concatenation of 100 logs it reads just
> the first one and ask me if I have any more.
>
> Why is this happening? I've changed LTAPESIZE in the
> ONCONFIG file on the restored server from 10m to 2g but it's
> made no difference.
>
> SOMETHING is teling ontape/onlog to read only the first 10m
> of the concatenated file. But what?!
>
> Thx
>
> Neil
>
>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-20-2008, 12:57 PM
Neil Truby
 
Posts: n/a
Default Re: ontape -l roll-forward of many logs

"Paul Watson" <paul@oninit.com> wrote in message
news:09b301c6ce17$acfed7b0$5583390a@arnold...
> You can not just cat the files together for patently obvious reasons,
> i.e. each log file has it's own individual header
>
> It is trivial to script the process though


Gosh! I think it's far from trivial, because you have to interleave
ontape -l's "Do you have another tape?" loop with a loop moving the next log
into place each time.
If you have a scriptfor it I'll give you a pound.

Thanks
Neil


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-20-2008, 12:58 PM
Paul Watson
 
Posts: n/a
Default Re: ontape -l roll-forward of many logs

You are kidding, of course it's trivial

mkfifo /tmp/mypipe
chmod 666 /tmp/mypipe
ontape -l < /tmp/mypipe > /tmp/ontape.out &

Then write a simple awk script that reads the file /tmp/ontape.out via
tail -f

The only gotcha is under Linux you need to use --pid on the tail -f to
ensure the tail closes when the ontape is complete.


Paul Watson
Tel: +44 1414161772
Mob: +44 7818003457
Web: www.oninit.com

GO FURTHER with DB2
GET THERE FASTER with Informix.
Attend the IDUG 2006 European Conference.
Vienna, Austria. 2-6 October 2006
Visit http://www.iiug.org/conf for more information.




> -----Original Message-----
> From: Neil Truby [mailto:neil.truby@ardenta.com]
> Posted At: 02 September 2006 01:43
> Posted To: comp.databases.informix
> Conversation: ontape -l roll-forward of many logs
> Subject: Re: ontape -l roll-forward of many logs
>
>
> "Paul Watson" <paul@oninit.com> wrote in message
> news:09b301c6ce17$acfed7b0$5583390a@arnold...
> > You can not just cat the files together for patently

> obvious reasons,
> > i.e. each log file has it's own individual header
> >
> > It is trivial to script the process though

>
> Gosh! I think it's far from trivial, because you have to
> interleave ontape -l's "Do you have another tape?" loop with
> a loop moving the next log into place each time.
> If you have a scriptfor it I'll give you a pound.
>
> Thanks
> Neil
>
>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-20-2008, 12:58 PM
Neil Truby
 
Posts: n/a
Default Re: ontape -l roll-forward of many logs

"Paul Watson" <paul@oninit.com> wrote in message
news:1e0801c6cea1$4c7db0c0$5583390a@arnold...
> You are kidding, of course it's trivial
>
> mkfifo /tmp/mypipe
> chmod 666 /tmp/mypipe
> ontape -l < /tmp/mypipe > /tmp/ontape.out &
>
> Then write a simple awk script that reads the file /tmp/ontape.out via
> tail -f


Doesn't work for me. The script ends staright away, leaving an zero-length
file /tmp/ontape.out (on Solaris). Where do you put the name of the restore
file?


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-20-2008, 12:58 PM
Paul Watson
 
Posts: n/a
Default Re: ontape -l roll-forward of many logs

What is in the awk script ?

Paul Watson
Tel: +44 1414161772
Mob: +44 7818003457
Web: www.oninit.com

GO FURTHER with DB2
GET THERE FASTER with Informix.
Attend the IDUG 2006 European Conference.
Vienna, Austria. 2-6 October 2006
Visit http://www.iiug.org/conf for more information.




> -----Original Message-----
> From: Neil Truby [mailto:neil.truby@ardenta.com]
> Posted At: 02 September 2006 14:03
> Posted To: comp.databases.informix
> Conversation: ontape -l roll-forward of many logs
> Subject: Re: ontape -l roll-forward of many logs
>
>
> "Paul Watson" <paul@oninit.com> wrote in message
> news:1e0801c6cea1$4c7db0c0$5583390a@arnold...
> > You are kidding, of course it's trivial
> >
> > mkfifo /tmp/mypipe
> > chmod 666 /tmp/mypipe
> > ontape -l < /tmp/mypipe > /tmp/ontape.out &
> >
> > Then write a simple awk script that reads the file

> /tmp/ontape.out via
> > tail -f

>
> Doesn't work for me. The script ends staright away, leaving
> an zero-length file /tmp/ontape.out (on Solaris). Where do
> you put the name of the restore file?
>
>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-20-2008, 12:58 PM
Art S. Kagel
 
Posts: n/a
Default Re: ontape -l roll-forward of many logs

Neil Truby wrote:
> "Paul Watson" <paul@oninit.com> wrote in message
> news:09b301c6ce17$acfed7b0$5583390a@arnold...
>
>>You can not just cat the files together for patently obvious reasons,
>>i.e. each log file has it's own individual header
>>
>>It is trivial to script the process though

>
>
> Gosh! I think it's far from trivial, because you have to interleave
> ontape -l's "Do you have another tape?" loop with a loop moving the next log
> into place each time.
> If you have a scriptfor it I'll give you a pound.


Get TCL & Expect. Expect is a superlanguage written over TCL (all TCP
syntax is available also in Expect scripts) which has a non-procedural
syntax specific to responding to prompts from software or hardware. Writing
a script to run ontape -l and rename the files as ontape asks for the next
one is trivial in Expect. I should have don my eventalarm.c using Expect
(TCP and therefore Expect is embedable).

Art S. Kagel
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:59 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com