Error in ontape
Posted in 2007
A user tried to clone an IDS 10 instance by piping an ontape level-0 archive (via STDIO) to another machine, hitting "Invalid DBspace" when restoring to a running server and a ROOTPATH mismatch error when offline. Art Kagel explained the engine must be OFFLINE for a full restore, that disk-related ONCONFIG settings and chunk paths/sizes must match (or use ontape's chunk-renaming, which reportedly may not work with STDIO), and that merging databases from several instances requires dbexport/dbimport, not ontape/onbar. For a daily offline copy he suggested Enterprise Replication synced once a day, or diffing dbexport files (e.g. with sqlupload). Martin Fuerderer noted IDS 11's Continuous Log Restore does roll-forward log application, though the server stays unusable for queries; another poster described a homegrown equivalent on older versions. No single fix, but clear guidance given.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Backup & Restore, Installation, Setup & Upgrades, Storage & Space Management, Server Administration
hi
I am trying to replicate IDS10 in another system thru ontape.
I took Level 0 backup of source IDS10 and trying to restore in
destination IDS10.
ontape -s -L 0-t STDIO>level-0 (In source IDS10)I copied this level-0 file into Destination IDS10 and run the
following command
1)cat level-0|ontape -r -t STDIO (when IDS10 is online)
It threw error Physical Restore failed gsf_ppc
Invalid DBspace (Actually this is a dbspace in source
which is not available in destination)
2)cat level-0|ontape -p -t STDIO(When IDS10 was offline)
it threw physical restore failed ONCONFIG ROOTPATH /home/chunk/rootdbs
diffres from archive: /ofbdbs/chunk/rootdbs
Correct ONCONFIG before restoring this archive.
My questions is :-
1)Do we need to have same ONCONFIG in Source and Destination ?
Any switch on ontape to override these param?
2)How can i overcome this situation?(apart from creating the
same directory structure,chunk name etc)
3)I am trying to copy various database from different
IDS into one system.ER is not possible as we are running
one legecy application on which we are not going to make
any changes at Database level.
4)Any other way of making "offline offsite readonly one day old"
copy of many databases from several different IDS installations?
5)How about running n number of IDS instances in
a single system? Do i need to install IDS in n number of locations ?
Thanks in advance for helping me and guiding me.
SHAILESH MISHRA wrote:
> hi
>
I'll answer your questions below, but I will begin by saying that you
should definitely RTFineM (Backup and Restore Guide) more thoroughly and
also search this forum's and the CDI archives and read the Infomrix FAQ
because this a recurring topic.
> I am trying to replicate IDS10 in another system thru ontape.
> I took Level 0 backup of source IDS10 and trying to restore in
> destination IDS10.
> ontape -s -L 0-t STDIO>level-0 (In source IDS10)> I copied this level-0 file into Destination IDS10 and run the
> following command
> 1)cat level-0|ontape -r -t STDIO (when IDS10 is online)
> It threw error Physical Restore failed gsf_ppc
> Invalid DBspace (Actually this is a dbspace in source
> which is not available in destination)
> 2)cat level-0|ontape -p -t STDIO(When IDS10 was offline)
> it threw physical restore failed ONCONFIG ROOTPATH /home/chunk/rootdbs
> diffres from archive: /ofbdbs/chunk/rootdbs
> Correct ONCONFIG before restoring this archive.
>
>
Partly because the engine has to be OFFLINE to perform a full restore.
You can only restore non-critical dbspaces to a running instance and
ONLY dbspaces that are already part of that instance NOT from another
instance. You CAN restore from one machine to another to clone a
server, but the engine has to be offline.
> My questions is :-
>
> 1)Do we need to have same ONCONFIG in Source and Destination ?
> Any switch on ontape to override these param?
>
Only disk parameters in the ONCONFIG file need to be the same.
Parameters like ROOTDB. Also all of the chunk paths from the source
server must exist on the target (unless you use chunk renaming during
the restore - see the manual - which MAY not work when used together
with STDIO input according to IBM [bug]) and each must be at least as
large as the corresponding chunk on the source machine.
> 2)How can i overcome this situation?(apart from creating the
> same directory structure,chunk name etc)
>
Use the chunk renaming feature of ontape (RTFM).
> 3)I am trying to copy various database from different
> IDS into one system.ER is not possible as we are running
> one legecy application on which we are not going to make
> any changes at Database level.
>
Not possible using ontape or onbar. You will have to dbexport the
databases from the source instance and dbimport them onto the target
server instance. (See the Migration Guide.)
> 4)Any other way of making "offline offsite readonly one day old"
> copy of many databases from several different IDS installations?
>
Enterprise Replication with replication normally turned off. Then you
manually sync the many source servers to the one copy server once a day
so that the data is at most one day old. (See the Enterprise
Replication Guide.)
> 5)How about running n number of IDS instances in
> a single system? Do i need to install IDS in n number of locations ?
>
Yes, you can run as many instances as your machine can handle (which is
usually quite a few - I've seen as many as 20 instances on a 32-way
UltraSPARC box all running happily). All of hte instances can be run
from the same installation directory/copy, you just need independent
ONCONFIG files with different ROOTDB, DBSERVERNAME/DBSERVERALIASES and
SERVERNUM entries.
Art S. Kagel
> Thanks in advance for helping me and guiding me.
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
thanks for replying in detail.
I will definitely read ALL the manuals throughly as soon as i get time.I am
basically a Linux admin and very limited informix knowledge.I am just trying
to learn it.
To be very frank,i would have been very relaxed if there was any option in
dbexport/dbimport which could generate something like
Level-1 ,Level-2 of optape(or onbar).DBEXPORT/DBIMPORT will work one time but
do i NEED to DBIMPORT daily even if there is very limited transactions
happening in remote sites.
1)Can we take level-1 backup through DBEXPORT/DBIMPORT?
2) is there anyway of re-running the logs after copying in some
other machine so that we can grab daily transactions and run it on other
machine to replicate data?
it seems i am targetting moon.
SHAILESH MISHRA wrote:
> thanks for replying in detail.
>
> I will definitely read ALL the manuals throughly as soon as i get time.I am
> basically a Linux admin and very limited informix knowledge.I am just trying
> to learn it.
> To be very frank,i would have been very relaxed if there was any option in
> dbexport/dbimport which could generate something like
> Level-1 ,Level-2 of optape(or onbar).DBEXPORT/DBIMPORT will work one time but
> do i NEED to DBIMPORT daily even if there is very limited transactions
> happening in remote sites.
>
> 1)Can we take level-1 backup through DBEXPORT/DBIMPORT?
>
No, not directly. However, the dbexport files are delimited text files,
so you can sort and diff one day's export files against the previous
days files and then apply the changes. One tool you can try using for
this is the sqlupload tool included in Jonathan Leffler's sqlcmd package
which you can download from the IIUG Software Repository. It will
insert missing rows and update existing rows. Deleted rows you'll have
to figure out a way to handle yourself.
> 2) is there anyway of re-running the logs after copying in some
> other machine so that we can grab daily transactions and run it on other
> machine to replicate data?
>
It sounds to me that the best option for you may be to use Enterprise
Replication with once-a-day synchronization to accomplish what you need.
Art S. Kagel
> it seems i am targetting moon.
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
Hi.
I believe that the error happens to the redireccionar the command ontape.
Use onmonitor to redirect ontatape file (In my instalation, ontape make a file
/backup/ontape).
After, perform a ontape -s -L 0; this create a file.
Copy file to new server to replicate.
Use onmonitor to configure ontape output to file copy form server source.
Recover the backup.
Good luck.
Hi,
1) No. dbexport/dbimport are export/import tools. They are not
backup tools.
2) With IDS 11, yes. It is called "Continuous Log Restore".
When using this, the server is kept in the logical recovery mode.
The log restore is done as long as there are some logs to restore.
Then server suspends the log restore and waits for the log restore
to be started again (as soon as there are more logs for restore).
This server is not usable for any queries, though. This is because
it stays in the log recovery mode and thus does not get into the
on-line mode (not even quiescent mode).
You can end the log restore any time, e.g. when the log restore is
currently suspended. But then there will be transaction cleanup
happening. I.e. currently open transactions will be rolled back to get
the server into a logically consistent state. After that it is usable.
However, then it is not possible to start the log restore again.
You'd have to start again with restoring a level-0 archive before you
can restore (more/newer) logs ...
Regards,
Martin
--
Martin Fuerderer
IBM Informix Development Munich, Germany
Information Management
IBM Deutschland GmbH
Chairman of the Supervisory Board: Hans Ulrich Märki
Board of Management: Martin Jetter (Chairman), Rudolf Bauer, Christian
Diedrich, Christoph Grandpierre, Matthias Hartmann, Thomas Fell, Michael
Diemer
Corporate Seat: Stuttgart, Germany; Reg.-Gericht: Amtsgericht Stuttgart,
HRB-Nr.: 14 562 WEEE-Reg.-Nr. DE 99369940
ids-bounces@iiug.org wrote on 13.12.2007 06:22:02:
> thanks for replying in detail.
>
> I will definitely read ALL the manuals throughly as soon as i get time.I
am
> basically a Linux admin and very limited informix knowledge.I am just
trying
> to learn it.
> To be very frank,i would have been very relaxed if there was any option
in
> dbexport/dbimport which could generate something like
> Level-1 ,Level-2 of optape(or onbar).DBEXPORT/DBIMPORT will work one
time but
> do i NEED to DBIMPORT daily even if there is very limited transactions
> happening in remote sites.
>
> 1)Can we take level-1 backup through DBEXPORT/DBIMPORT?
>
> 2) is there anyway of re-running the logs after copying in some
> other machine so that we can grab daily transactions and run it on other
> machine to replicate data?
>
> it seems i am targetting moon.
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
Oh linux admin,
You are not targetting the moon.
As Martin just posted such a moonshot is available in IDS 11.
What version of IDS do you want to try this in? (Sorry, u probably said but I
forgot).
Be creative -
Years ago, before the wonderous advances of IDS 11, when I was on IDS 7 using
onarchive instead of ontape or onbar (yes nobody liked onarchive and its no
longer used/supported but it was not so bad, I learned it in one sunday
afternoon)...... Anyway on IDS 7, Solaris 8, instead of informix HDR or such
like that (because our pipe between servers wasn't big enough).....
I did a homegrown version of what Martin mentioned (IDS 11, "Continuous Log
Restore"). I used informix alarmprogram on production server to trigger log
backup only on every 5th log instead of every log, log backup went to disk
location, and also ftp'd to second server (quite far away)..... On second
server IDS 7 waited patiently in constant roll forward mode (controlled by an
expect script). The expect script was constantly running at unix level, in a
logic loop, it continously monitored the ftp-arrival directory and upon
complete arrival of a log bundle from production, the expect script would hand
the bundle to the constantly running log-recovery command (also onarchive)
which would apply the logs to the DB.
Dear linux admin, you are no doubt adventurous, apply that brain and sense of
adventure to informix and you will be on the moon in no time.
Have fun,
Norma Jean Sebastian
(Ancient unix admin (SCO!), Informix 4GL-er, Informix DBA version 4-9)
via bberry
============================================================
The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader
of this message is not the intended recipient, or an employee
or agent responsible for delivering this message to the
intended recipient, you are hereby notified that any reproduction,
dissemination or distribution of this communication is strictly
prohibited. If you have received this communication in error,
please notify us immediately by replying to the message and
deleting it from your computer. Thank you. Tellabs
============================================================