Re: continuous log backup to disk (ontape -c) ... again
Posted in 1998
In article <6g0cp9$r9g$1@nw003t.infi.net>, Glenn Travis
<gtravis@divx.com> writes
>I am wanting to run continuous log backups to disk and have been successful
>in laying out the initital strategy;
>
>. full backup (ontape -s -L 0) nightly
>. then start a script to the log backup in the background;
> ontape -c <<EOF >ontape.c.log
> ^M
> EOF>. kill the ontape -c script before running the next backup.
>. backup the log file (LTAPEDEV). (move or rename or delete, then touch a
>new one).
>. restart script (ontape -c) in background.
>
>This works fine EXCEPT when the LTAPESIZE is reached by the background
>ontape -c process.>Since this process is running unattended in the background (we passed the
>RETURN ^M character to initiate), the next prompt to mount a new LTAPEDEV
>(in this case a filename), spins out of control, filling the ontape.c.log
>logfile. (I use the output in this logfile to get the log file numbers
>which were backed up). If the size of LTAPEDEV is reached before the
>process is killed prior to the nightly backup, the scripts loops, asking for
>a new file, eventually filling up disk space.
>
>I know you are going to suggest making LTAPEDEV large enough to hold all the
>logs for the day. Well, 2gb is the limit and sometimes we reach that. So,
>I want it to wait until I back it up and touch a new one. I don't want it
>to keep asking for a new file. Why does it think I've entered a return to
>the prompt, when I only passed one return character to the ontape -c
>command?
>
It does not, I thinks the read() system call has returned 0 (which it
has), this can either mean
a) no more data to read
b) Try again and read may return more data.
Remember read() can return LESS bytes than requested I which can you h
have to do what ontape it doing which is loop and read again..
This is why Informix say DONT RUN ONTAPE IN THE BACKGROUND and don't
like supporting this.
Can't you kili it earlier (say every 6 hours and restart it.
Or course you have to move the 'full tape' i.e. 2Gb disk file out
of the way first or else it gets overwritten. (The other reason why
Informix don't like supporting untape to disk.
Infromix: "Or you overwrote it..well tough you can't rollforward"
User: "Informix is crap!"
Informix "(**&^%*&^%!!!"
>any ideas on solving this one?
>
>thanks,
>Glenn Travis
>Sr. DBA
>Circuit City / Divx
>
>Informix 7.23uc9
>Sun solaris 2.5
>
>
--
David Williams
Maintainer of the Informix FAQ
Primary site (Beta Version) http://www.smooth1.demon.co.uk
Official site http://www.iiug.org/techinfo/faq/faq_top.html
I see you standin', Standin' on your own, It's such a lonely place for you, For
you to be If you need a shoulder, Or if you need a friend, I'll be here
standing, Until the bitter end...
So don't chastise me Or think I, I mean you harm...
All I ever wanted Was for you To know that I care