help me to clearify few of the points
Posted in 2009
A newcomer asked whether an ontape level-0 archive can be restored onto a different server with different raw-device layout, whether only full restores are possible, and how to restore just a few dbspaces (getting "Physical restore failed - Archive API error: on open"). Replies explained that on his old IDS (around 7.x) the chunk paths must exist with the same names and be at least as large, so symbolic links are the usual trick; redirected/renamed restores only arrived with IDS 10/11. You cannot restore an individual dbspace into an existing, different instance — a cold restore must include rootdbs and the critical spaces, and the engine validates chunk origin. To move data between servers, use dbexport/dbimport, HPL/onpload, dbaccess UNLOAD/LOAD, dbload, remote INSERT...SELECT, or tools like myexport/dbcopy. Posters also urged reading the manuals or upgrading.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Backup & Restore, Storage & Space Management
Hi All,
Please help me to clear below points.
1. If we have an ontape level 0 backup, can't we restore this on another
server if we don't have identical raw device structure over there? Although
size of logical volume is same.
2.We only can do full restore on the system from which level 0 were backed up,
Is it true?
3. How can I do a restore of few of the dbspaces from level 0 backup.
I am trying using the command below.
ontape -r -D sabledbs_6? is it right
I have created an xxxxx dbspace similar to which in level 0 archive on the new
server but still I am getting few of the errors.
Physical restore failed - Archive API error: on open
Program over.
What else I have do in order to restore few of the dbspace from level 0 backup.
Please guide me, as I am new to informix.
2009/10/22 DEEPAK JOSHI <djoshih@hotmail.com>:
> Hi All,
>
> Please help me to clear below points.
>
> 1. If we have an ontape level 0 backup, can't we restore this on another
> server if we don't have identical raw device structure over there? Although
> size of logical volume is same.
>
> 2.We only can do full restore on the system from which level 0 were backed
up,
> Is it true?
>
> 3. How can I do a restore of few of the dbspaces from level 0 backup.
>
> I am trying using the command below.
>
> ontape -r -D sabledbs_6? is it right>
> I have created an xxxxx dbspace similar to which in level 0 archive on the
new
> server but still I am getting few of the errors.
>
> Physical restore failed - Archive API error: on open
>
> Program over.
>
> What else I have do in order to restore few of the dbspace from level 0
> backup.
>
> Please guide me, as I am new to informix.
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
Operating System and IDS Version with EVERY initial post is most
useful, however, assuming you are still referring to your ancient IDS.
In order to restore an ontape archive you must have identically sized
(or larger) spaces available with the same mount point names. (If you
have IDS 9 you could rename, but not where you are).
Full restores can be done to any server with the same IDS version
installed, with the same O/S and with the same spaces.
You cannot use ontape to restore dbspaces or even individual databases
(at you level) only the entire instance, I don't know where you are
getting the -D parameter, it certainly isn't available at IDS 9 and I
know you are well before that!!
We know you are new to informix, but please get some training and read
some manuals.
DEEPAK JOSHI wrote:
> Hi All,
>
> Please help me to clear below points.
>
> 1. If we have an ontape level 0 backup, can't we restore this on another
> server if we don't have identical raw device structure over there? Although
> size of logical volume is same.
>
>
Depending on your version (If you are in 10 or 11) yes you can. You can
do a redirected restore. If not your only option is to use a symbolic
link to mimic the source device structure.
> 2.We only can do full restore on the system from which level 0 were backed
up,
> Is it true?
>
This is true. I guess you mena that you can only do a cold restore of an
instance if you have a level 0 archive.
> 3. How can I do a restore of few of the dbspaces from level 0 backup.
>
> I am trying using the command below.
>
> ontape -r -D sabledbs_6? is it right>
This is right to do a warm restore but in your case is probably not
correct. If you start from scratch (engine down) and you do not want to
restore all dbspaces you must restore ALSO the critical dbspaces (Any
dbspaces that contain logical log files, the physical log AND the
rootdbs) so in th emost simple case (all logs are in the rootdbs) the
minimal command you can run is:
ontape -r -D rootdbs sabledbs_6> I have created an xxxxx dbspace similar to which in level 0 archive on the
new
> server but still I am getting few of the errors.
>
> Physical restore failed - Archive API error: on open
>
> Program over.
>
You cannot create a dbspace in a server and then restore the dbspace
from another server. IDS is not that dumb, it checks a few things to
corroborate that the space comes from the correct place
> What else I have do in order to restore few of the dbspace from level 0
> backup.
>
> Please guide me, as I am new to informix.
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>
>
OK, there's something you are missing, that being the intent of ontape/onbar
archives. The intent is to take an image of the current server instance's
disk space so that in case of disaster the server can be resurrected using
the archive to restore its disk image.
Yes, you can restore the image to a different machine. This is permitted in
case there is a catastrophic hardware failure requiring the installation of
the archive on a new machine. However, for all releases prior to IDS 10.00,
all of the disk chunk paths that were present in the archive file/tape must
exist and be at least as large as the original file/device was. That is
why, though you may not know it, most IDS DBAs use symbolic links for the
chunk paths so that if a restore to a different machine or to different
storage structures on the same machine is required, then the links can just
be rebuilt on the new machine (or on the same machine pointing to the new
storage) and poof, everything works.
In the newest releases (10.00, 11.10, & 11.50) it is possible to restore the
chunks to a different path, to effectively 'rename' the chunks during the
restore operation, but you are using and older release without this
capability IIRC. Even so, the newest releases still will not allow you to
restore a dbspace from one server to another.
What you seem to want to do, however, is to copy a dbspace from one server
to another existing server from an archive that was taken on the first
server. This you cannot do. If you need to port data from one server to
another, you have many options. Restore from an archive is not one of them.
One option is not open to you. In newer versions of IDS (again 10.00 and
later), you can use the archecker utility to extract data from an archive
and insert it into tables in an existing database on any server. However,
the older version of archecker which you have does not have this capability
IB (John, can you comment on that?)
The other options are as follows and some are documented in the Migration
Guide manual:
- dbexport the database on one server and dbimport it onto the other
server.
- This will extract and recreate an entire database, not be dbspace.
- You can also use my dbexport/dbimport replacement utility package,
myexport, which you can download from the IIUG Software Repository (also
download my utils2_ak package, Jonathan Leffler's sqlcmd package and Ravi
Krishna's myonpload package which myexport/myimport require)
- Use the High Performance Loader to extract data for one or more
tables, recreate the table(s) on the other server and use the HP Loader to
reload the data. The HP Loader has its own manual.
- Note that myexport (see above) can optionally use the HP Loader -
via myonpload - to run quite a bit faster without you needing to
know how to
set up an HP Loader job
- You can also use the myonpload utility manually for the same
reasons.
- Copy the data directly from one server to the other.
- This can be done in dbaccess (or sqlcmd) using INSERT INTO <remote
table> ... SELECT FROM <local table>...;
- You can use my dbcopy utility which is much faster copying between
two servers than dbaccess or sqlcmd. (Dbcopy is in the
utils2_ak package).
- Write scripts yourself to extract the data using dbaccess (UNLOAD
TO) and reload it (LOAD FROM) the same way or using dbload (documented in
the Migration Guide).
Art
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. 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, Oct 22, 2009 at 9:30 AM, DEEPAK JOSHI <djoshih@hotmail.com> wrote:
> Hi All,
>
> Please help me to clear below points.
>
> 1. If we have an ontape level 0 backup, can't we restore this on another
> server if we don't have identical raw device structure over there? Although
> size of logical volume is same.
>
> 2.We only can do full restore on the system from which level 0 were backed
> up,
> Is it true?
>
> 3. How can I do a restore of few of the dbspaces from level 0 backup.
>
> I am trying using the command below.
>
> ontape -r -D sabledbs_6? is it right>
> I have created an xxxxx dbspace similar to which in level 0 archive on the
> new
> server but still I am getting few of the errors.
>
> Physical restore failed - Archive API error: on open
>
> Program over.
>
> What else I have do in order to restore few of the dbspace from level 0
> backup.
>
> Please guide me, as I am new to informix.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--00235453092867043c047687056a
Man I am not being mean at all here - but you really need to dig into some online doc. The best place to look is here: http://publib.boulder.ibm.com/infocenter/idshelp/v10/index.jsp You'll continue to get help here from us all because we like to show off how much we know (or in some cases don't) but you'll be a happy camper if you can learn ya some stuff. MM
On Thu, Oct 22, 2009 at 07:36, Gustavo Castro
<gcastro_iiug@bellsouth.net>wrote:
> DEEPAK JOSHI wrote:
> > Please help me to clear below points.
> >
> > 1. If we have an ontape level 0 backup, can't we restore this on another
> > server if we don't have identical raw device structure over there?
> Although
> > size of logical volume is same.
> >
> >
> Depending on your version (If you are in 10 or 11) yes you can. You can
> do a redirected restore. If not your only option is to use a symbolic
> link to mimic the source device structure.
>
Unless I'm misremembering, Deepak is normally working on IDS 7.13 (not
7.31). But, compared with OnLine 5.01, that's quite modern.
If the device names on the logical volume level are the same on both
machines, it shouldn't matter if the raw devices behind the logical volumes
are different.
> > 2.We only can do full restore on the system from which level 0 were
> backed up,
> > Is it true?
> >
> This is true. I guess you mean that you can only do a cold restore of an
> instance if you have a level 0 archive.
> > 3. How can I do a restore of few of the dbspaces from level 0 backup.
> >
> > I am trying using the command below.
> >
> > ontape -r -D sabledbs_6? is it right>
With IDS 7.13, I don't think that is an option.
> This is right to do a warm restore but in your case is probably not
> correct. If you start from scratch (engine down) and you do not want to
> restore all dbspaces you must restore ALSO the critical dbspaces (Any
> dbspaces that contain logical log files, the physical log AND the
> rootdbs) so in th emost simple case (all logs are in the rootdbs) the
> minimal command you can run is:
>
> ontape -r -D rootdbs sabledbs_6> > I have created an xxxxx dbspace similar to which in level 0 archive on
> the new
> > server but still I am getting few of the errors.
> >
> > Physical restore failed - Archive API error: on open
> >
> > Program over.
>
> You cannot create a dbspace in a server and then restore the dbspace
> from another server. IDS is not that dumb, it checks a few things to
> corroborate that the space comes from the correct place
>
> > What else I have do in order to restore few of the dbspace from level 0
> > backup.
>
Upgrade to a version of IDS that support the features you want.
--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2008.0513 -- http://dbi.perl.org/
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."
NB: Please do not use this email for correspondence.
I don't necessarily read it every week, even.
Jonathan Swift<http://www.brainyquote.com/quotes/authors/j/jonathan_swift.html>
- "May you live every day of your life."
--001485f8975e0667350476912a7b
I'm getting the impression that some Informix DBA's job was outsourced. Bob ----- Original Message ----- From: "MIKE MAGIE" <jmmagie@yahoo.com> To: ids@iiug.org Sent: Thursday, October 22, 2009 1:01:47 PM GMT -05:00 US/Canada Eastern Subject: Re: help me to clearify few of the points [17688] Man I am not being mean at all here - but you really need to dig into some online doc. The best place to look is here: http://publib.boulder.ibm.com/infocenter/idshelp/v10/index.jsp You'll continue to get help here from us all because we like to show off how much we know (or in some cases don't) but you'll be a happy camper if you can learn ya some stuff. MM ******************************************************************************* Forum Note: Use "Reply" to post a response in the discussion forum.