View Single Post

   
  #1 (permalink)  
Old 04-19-2008, 07:52 PM
Colin Bull
 
Posts: n/a
Default RE: database restore with ontape -r on Informix Online Dynamic Server 7.31 on Linux


David Williams wrote
>
> "Andy Kent" <andykent.bristol@virgin.net> wrote in message
> news:a3525a11.0401080308.64a1ed12@posting.google.c om...
> > Why ever would you want to run a cold restore unattended?
> >
> > Great laxative ...
> >

>
> To create a reporting database once per week...
>
> Once all the ontape stuff is finished don't forget to
>
> a) Sit in a loop running onstat - and check the return
> code each time.Wait for the server to reach quiescent
> mode. This can take 45 mins.
>
> b) onmode -m to move to Online mode.
>
> Otherwise a reboot means another restore!
>
> I had this working great for a customer a while back!

Here is one I prepared earlier ---

onbar/ontape whatever ..
FORCEOL=n
until onstat - | grep "On-Line" > /dev/null
do
echo "Off line" # ; sleep 20
onstat - | grep "[BQ][lu][oi][ce][ks]" > /dev/null && ( echo "\nServ blokd"
if [ x$FORCEOL = "xn" ] ; then
echo "Onlining.." ; onmode -m ; FORCEOL=y; sleep 240
else
echo "waiting to online " ; sleep 240
fi
)
onstat - # for comfort factor
sleep 60
done

This seems to work on our automated restore of live for testing.
I know the grep line looks like a load of boll*cks. But it works.
Tru64 5.1 and ksh

Colin Bull
c.bull@videonetworks.com

sending to informix-list
Reply With Quote