vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| ||||
| "Colin Bull" <c.bull@videonetworks.com> wrote: > 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 'onstat -' sets the return code according to the server state -> no need for boll*cking greps... From the top of my head: 255 = server is offline ("Shared memory not initialized...") 5 = online 4 = some error 0..3 = several other states like quiescent, blocked etc. (don't know exacly) HTH Christian -- #include <std_disclaimer.h> /* The opinions stated above are my own and not necessarily those of my employer. */ |