Re: how to restore archive to 2 instances on same server
Posted in 2000
Topics: Backup & Restore, Storage & Space Management, Server Administration, Logging & Checkpoints, Migration, Import/Export & Data Conversion, Versions, Editions & End-of-Life
Tam McLaughlin wrote:
>
> We have a development server with 3 instances of the engine running.
> 2 of the instances contain copies of the production databases from the
> production
> server. The copies are to be updated frequently. This can be done with a
> lenghy
> dbexport/dbimport but I would rather use ontape and restore a level 0
> archive.
> This can easily be done with one of the instances as I can create device
> names match
> the production instancebut I am not sure about the other. Would it be
> possible to do
> something like the following:
>
> assume device dir is /dev/rdsk
>
> production server:
>
> rootdbs : slice1 : ln -s slice1 c0b0t0d0s1
>
> dev instance1
>
> rootdbs: raw1 : ln -s raw1 c0b0t0d1s1
>
> dev instance2
>
> rootdbs: rawa : ln -s rawa c0b0t0d1s2
>
> but when i go to do a restore I create a link from slice1 to raw1 so I have:
>
> slice1 --> raw1 --> c0b0t0d0s1
>
> do restore
>
> rm slice links
>
> create links pointing to instance 2
>
> slice1 --> rawa --> c0b0t0d1s2
>
> How do other people do this ?
> It its any help, it's IDS 7.30, unixware 7.0.1, database instance ~ 18 Gb
You can do that, but it is NOT RECOMMENDED !
You should reorganize your production server
(dbexport/reinitialize/dbimport) to be able
to restore on development server instances:
0. Dbexport all databases from your production instance.
1. For all instances have separated directories
for their chunks which are links to actual devices.
ie.
on production server: /prodinst
on development server: /devinst1
/devinst2
2. Use the same chunk names for all instances.
ie.
on production server: /prodinst/rootchunk -> /dev/rdsk/c0b0t0d0s1
/prodinst/datachunk -> /dev/rdsk/c0b0t0d0s2
on development server: /devinst1/rootchunk -> /dev/rdsk/c0b0t0d0s1
/devinst1/datachunk -> /dev/rdsk/c0b0t0d0s2
/devinst2/rootchunk -> /dev/rdsk/c0b0t0d0s3
/devinst2/rootchunk -> /dev/rdsk/c0b0t0d0s4
3. In onconfig files for all instances use relative
pathname for ROOTPATH (only the basename of root chunk).
ie.
ROOTPATH=rootchunk
4. Initialize your instances from their respective chunk directories
with their respective environments.
ie.
on production server: cd /prodinst
oninit -i on development server: cd /devinst1
oninit -i
cd /devinst2
oninit -i NOTE: It is not necessary to initialize development instances
if you know what you are doing, but you may want to check if this
works!
5. Create additional dbspaces ONLY with onmonitor
from chunk directory of respective instance
and use relative pathnames for chunks (only basenames).
Use the same names for dbspaces on all instances
(and for their respective chunks).
ie.
on production server: cd /prodinst
onmonitor (add dbspaces as needed)
on development server: cd /devinst1
onmonitor (add dbspaces as needed)
cd /devinst2
onmonitor (add dbspaces as needed)
NOTE: Again, it is not necessary to do this on development
instances, but it is safe to see all instances running
with the same configuration!
WARNING: Do not use onspaces in this step. It converts
relative pathnames to absolute ones!!!
6. Perform any additional work related to dbspaces
on all instances (move physical/logical logs).
7. Dbimport all databases to your production instance
From now you can use ontape to backup your production instance
and restore on your development instances, but remember:
EVERY TIME YOU BOUNCE YOUR INSTANCES OR PERFORM AN ONTAPE
RESTORE YOU SHOULD BE IN THEIR RESPECTIVE CHUNK DIRECTORIES.
HTH and good luck,
Mladen
Mladen Jovanovski wrote: > ... > > 3. In onconfig files for all instances use relative > pathname for ROOTPATH (only the basename of root chunk). > ie. > ROOTPATH=rootchunk > > 4. Initialize your instances from their respective chunk directories > with their respective environments. > ... > > EVERY TIME YOU BOUNCE YOUR INSTANCES OR PERFORM AN ONTAPE > RESTORE YOU SHOULD BE IN THEIR RESPECTIVE CHUNK DIRECTORIES. > Mladen This is great stuff! It actually seems to work (I'm planning a little more extensive testing than what I've done so far - created 3 instances on the same box , the last 2 derived from the first's Level 0 backup). I'm surprised that Informix hasn't bothered to document this. Thanks, Mladen. Rudy
Great until you start the instance from the wrong directory and online flags all the 'missing' chunks as corrupt and you have to restore from backup! Rudy Fernandes wrote in message <399C37BC.4C43042F@americasm01.nt.com>... >Mladen Jovanovski wrote: > >> ... >> >> 3. In onconfig files for all instances use relative >> pathname for ROOTPATH (only the basename of root chunk). >> ie. >> ROOTPATH=rootchunk >> >> 4. Initialize your instances from their respective chunk directories >> with their respective environments. >> ... > >> >> EVERY TIME YOU BOUNCE YOUR INSTANCES OR PERFORM AN ONTAPE >> RESTORE YOU SHOULD BE IN THEIR RESPECTIVE CHUNK DIRECTORIES. >> Mladen > >This is great stuff! It actually seems to work (I'm planning a little more >extensive testing than what I've done so far - created 3 instances on the same >box , the last 2 derived from the first's Level 0 backup). > >I'm surprised that Informix hasn't bothered to document this. > >Thanks, Mladen. > >Rudy > >