Re: Ontape recovery ?
Posted in 1998
Barry Leb (barryleb@atl.mindspring.com) wrote:
: What I would like to do is restore this tape on the same machine in a
: different instance using the same chunk names but using symbolic links
: to different raw devices. For example:
: Current production database resides in the dbspace pdata.
: pdata's pathname is /dev/informix/prod/pdata.
: In turn, /dev/informix/prod/pdata is a symbolic link to
: /dev/vg01/pdata.
: For the restored database I have also create a chunk called pdata.
: However, pdata's pathname in this instance is
: /dev/informix/restore/rdata which in turn is a symbolic link to
: /dev/vg02/rdata.
Although you use symbolic link, but the way you specify in ONCONFIG
and onmonitor _IS_ looking at /dev/informix/prod/pdata (an absolute
pathname). So I don't think you can get away with it.
Better to restore to another machine, if available and possible.
: In other words, does the ontape -r actually look to the pathnames to
: the chunk, or does it only care that the chunk exists in the new
: instance?
The way I use symbolic link is to create a database, e.g.,
$INFORMIDIR/production/chunk1
$INFORMIDIR/production/chunk2
ls -l chunk*
chunk1 -> /dev/rlv001 (AIX here)
chunk2 -> /dev/rlv002
onstat -c | grep ROOTPATHROOPATH chunk1 # Path for device containing root dbspace
^^^^^^^^
|-------------- not absolute
So if I were in your situation, I would simply do
mkdir $INFORMIXDIR/restore
cd $INFORMIXDIR/restore
ln -s /dev/rotherchunk001 chunk1
ln -s /dev/rotherchunk002 chunk2
Copy over onconfig, change servernum, servername, /etc/services accordingly
and INFORMIXSEVER then does the ontape -r.
Of course, the down-side is, you need to remember to cd $INFORMIXDIR/production
whenever you want to startup or add chunks or use onmonitor/ontape/onbar.
Because the chunk{0,1} is not an absolute path specified in onconfig.
--
Chris Lo mailto: cklo@hk.super.net
System Administrator/Informix DBA mailto: cklo@cklo.hk.super.net
The Prudential Assurance (HK) Co. Ltd mailto: paclck@hk.net
==============================================================================
-- Linux + FreeBSD + HPUX + Solaris + AIX
==============================================================================
#include <std/disclaimer.h>