ontape -p/r with changed ROOTPATH
Posted in 2011
Waldek wanted to restore an ontape L0 archive from a live server into two test instances on the same box, where the chunk/ROOTPATH locations differ. Paul Watson pointed him to ontape's -rename option; the key gotcha was that all chunks must be listed, not just the root chunk. For the chunk list, suggestions were onstat -d on the source (or the dbspace/chunk listing shown at restore start), plus Dave Griffen's SQL against sysmaster:syschunks to generate a redirect file. Waldek got it working, though on 11.50.FC7 he still had to set ONCONFIG ROOTPATH to the archive's original path before restoring (behaviour others reported differing); Art Kagel noted ontape rewrites ROOTPATH in the ONCONFIG with the renamed chunk.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Backup & Restore, Storage & Space Management, Server Administration, Platform-Specific Issues
Hello all.
I'm having 2 IDS instances on the same Linux box here. Both of them meant to
be a restored ( ontape -r or -p (doesn't salvage the logfiles) ) version of
our live server. They are test00 and test01.
Our live server uses /informix-live/devices/dbspaces as a ROOTPATH in it's
onconfig during ontape backup. The same path is tried to be used when
restoring this ontape L0 file onto any other instance. As we have two
instances which will be actually a copy of the live server (test00 and test01)
I have to change the ROOTPATH for each of them to something else as they are
using different /dev/* devices. I'm thinking about changing it during the
ontape restore or right after that (also altering the ONCONFIG).
Is any of the above possible anybody knows?
cheers
Waldek
Use the rename chunk option on the restore and you'll be fine
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
WALDEMAR ZNOINSKI
Sent: Tuesday, April 26, 2011 9:13 AM
To: ids@iiug.org
Subject: ontape -p/r with changed ROOTPATH [23486]
Hello all.
I'm having 2 IDS instances on the same Linux box here. Both of them meant to
be a restored ( ontape -r or -p (doesn't salvage the logfiles) ) version of
our live server. They are test00 and test01.
Our live server uses /informix-live/devices/dbspaces as a ROOTPATH in it's
onconfig during ontape backup. The same path is tried to be used when
restoring this ontape L0 file onto any other instance. As we have two
instances which will be actually a copy of the live server (test00 and
test01)
I have to change the ROOTPATH for each of them to something else as they are
using different /dev/* devices. I'm thinking about changing it during the
ontape restore or right after that (also altering the ONCONFIG).
Is any of the above possible anybody knows?
cheers
Waldek
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
_____
avast! Antivirus <http://www.avast.com> : Outbound message clean.
Virus Database (VPS): 110426-0, 04/26/2011
Tested on: 4/26/2011 9:33:16 AM
avast! - copyright (c) 1988-2011 ALWIL Software.
Thanks Paul, that worked
The previous time I was trying -rename option I somehow missed the note that I
have to specify all the chunks instead of just the first ...
Is there a way of getting a list of the chunks from L0 file or should I create
it using onstat -d on a source (live in this case) server and the use it?
You can get it from the tape but the source and onstat -d is probably
easier. The first part of the restore should show the dbspaces/chunks
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
WALDEMAR ZNOINSKI
Sent: Tuesday, April 26, 2011 10:41 AM
To: ids@iiug.org
Subject: Re: RE: ontape -p/r with changed ROOTPATH [23488]
Thanks Paul, that worked
The previous time I was trying -rename option I somehow missed the note that
I
have to specify all the chunks instead of just the first ...
Is there a way of getting a list of the chunks from L0 file or should I
create
it using onstat -d on a source (live in this case) server and the use it?
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
_____
avast! Antivirus <http://www.avast.com> : Outbound message clean.
Virus Database (VPS): 110426-0, 04/26/2011
Tested on: 4/26/2011 10:49:36 AM
avast! - copyright (c) 1988-2011 ALWIL Software.
Not sure if you noted that you also need to change your $ONCONFIG =
ROOTPATH to point to what is on the backup image.
j.
On Apr 26, 2011, at 11:41 AM, WALDEMAR ZNOINSKI wrote:
> Thanks Paul, that worked=20
> The previous time I was trying -rename option I somehow missed the =
note that I=20
> have to specify all the chunks instead of just the first ...=20
>=20
> Is there a way of getting a list of the chunks from L0 file or should =
I create=20
> it using onstat -d on a source (live in this case) server and the use =
it?=20
>=20
>=20
> =
**************************************************************************=
*****=20
> Forum Note: Use "Reply" to post a response in the discussion forum.=20=
>=20
WALDEMAR ZNOINSKI WROTE:
================================================================================
=======
Is there a way of getting a list of the chunks from L0 file or should I create
it using onstat -d on a source (live in this case) server and the use it?
================================================================================
=======
Response:
Here is an SQL I use to build a redirect file. This does presume all chunks
use the same links directory and that the path is not reiterated as a filename.
database sysmaster;
unload to redirect_file delimiter ' '
select fname, offset,replace(fname,'<source-links-path>','<target-links-path>'), offset
from syschunks
Jack Parker Wrote: ================================================================================ Not sure if you noted that you also need to change your $ONCONFIG = ROOTPATH to point to what is on the backup image. j. ================================================================================ Response: I think this depends on the version. 11.50.FC5 redirected restore seems to work with either source or target ROOTPATH specified in the $ONCONFIG.
Cool, yet another reason... j. On Apr 26, 2011, at 4:52 PM, DAVE GRIFFEN wrote: > Jack Parker Wrote:=20 >=20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=20 > Not sure if you noted that you also need to change your $ONCONFIG =3D=20= > ROOTPATH to point to what is on the backup image.=20 >=20 > j.=20 >=20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=20 >=20 > Response:=20 > I think this depends on the version. 11.50.FC5 redirected restore = seems to=20 > work with either source or target ROOTPATH specified in the $ONCONFIG.=20= >=20 >=20 > = **************************************************************************= *****=20 > Forum Note: Use "Reply" to post a response in the discussion forum.=20= >=20
hey again thanks guys - with all this info I've managed to make this restore w/rename working like now
FYI (IDS11.50FC7) Physical restore failed - ONCONFIG ROOTPATH: '/informix/testdub02/devices/dbspaces' differs from archive: '/informix-live/devices/dbspaces' Correct ONCONFIG before restoring this archive. so still changing the ROOTPATH to the original one is needed
WALDEMAR ZNOINSKI Wrote:
--------------------------------------------------------------------------------
--------------------------------------------
FYI (IDS11.50FC7)
Physical restore failed - ONCONFIG ROOTPATH:
'/informix/testdub02/devices/dbspaces' differs from archive:
'/informix-live/devices/dbspaces'
Correct ONCONFIG before restoring this archive.
so still changing the ROOTPATH to the original one is needed
--------------------------------------------------------------------------------
--------------------------------------------
Response:
Interesting. I just went back and did several ontape rename restore tests
using 11.50.FC5 on HP-UX 11.23 ia64. Leaving the target ROOTPATH specified in
onconfig simply works on my system. The only way I get this type of error is
by omitting the root chunk from my rename list. Even in that obvious case, the
error I receive is slightly different...
Physical restore failed - ONCONFIG ROOTPATH:ROOTOFFSET
'/dev/ifmxtest/whseroot01
:0' differs from archive '/dev/ifmxwhse/whseroot01:0'
Correct ONCONFIG before restoring this archive.
I guess there are some additional factors than just the version. I'm not sure
what they are though.
Ontape will rewrite the ROOTPATH in the ONCONFIG file with the one specified
to replace that original chunk for you.
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
organization with which I am associated either explicitly, implicitly, or by
inference. Neither do those opinions reflect those of other individuals
affiliated with any entity with which I am affiliated nor those of the
entities themselves.
On Thu, Apr 28, 2011 at 4:05 PM, DAVE GRIFFEN <dgriffen@finishline.com>wrote:
> WALDEMAR ZNOINSKI Wrote:
>
>
>
--------------------------------------------------------------------------------
--------------------------------------------
> FYI (IDS11.50FC7)
> Physical restore failed - ONCONFIG ROOTPATH:
> '/informix/testdub02/devices/dbspaces' differs from archive:
> '/informix-live/devices/dbspaces'
> Correct ONCONFIG before restoring this archive.
>
> so still changing the ROOTPATH to the original one is needed
>
>
>
--------------------------------------------------------------------------------
--------------------------------------------
>
> Response:
> Interesting. I just went back and did several ontape rename restore tests
> using 11.50.FC5 on HP-UX 11.23 ia64. Leaving the target ROOTPATH specified
> in
> onconfig simply works on my system. The only way I get this type of error
> is
> by omitting the root chunk from my rename list. Even in that obvious case,
> the
> error I receive is slightly different...
>
> Physical restore failed - ONCONFIG ROOTPATH:ROOTOFFSET
> '/dev/ifmxtest/whseroot01
> :0' differs from archive '/dev/ifmxwhse/whseroot01:0'
> Correct ONCONFIG before restoring this archive.
>
> I guess there are some additional factors than just the version. I'm not
> sure
> what they are though.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--20cf301afb395caede04a2011cac
Related threads
- IDS 10 table-level restore
- Informix Development Webinar December 11, 2007
- Migrate from HP PA-RISC to HP ITANIUM by ontape