RE: Level 0 archive restore on Informix 7.24
Posted in 1999
I do believe that doing the following works.
This requires two sessions.
session 1:
1.Get the tape to the beginning of the ontape backup
2. Make TAPEDEV no rewind devices
3. ontape -r
4. Continue as normal until after it lists all the databases its going to
restore.
You are then asked whether or not you want to continue.
At this point use your second session to reposition the tape
to the beginning of the backup.
5. Answer yes to continue.
I am reciting all this from memory. I don't have a test box to make sure I
am remembering everything correctly.
The following is just a hypothesis and as far as I know only has a basis
in my reality :)
Here is what I think ontape does.
It reads the header off of the backup device and displays that information to
the terminal. Itthen expects the tape device to have rewound because its
a rewindable device. It then expects to have to go over the header again
but it is already passed the header so it gets confused and aborts. So
what step 4 does, is put the tape back where ontape expected
it to be when it starts the actual restore.
Hope this helps
Will
>===== Original Message From "Rajesh" <kapur@attglobal.net> =====
>Thanks for the response. You are right... rmt0.1 is the non-rewind option
>for rmt0. The rewind/non-rewind option come into effect at the end of the
>read operation. That is why "dd if=/dev/rmt0.1 of=/temp/ddarc bs=16k" will
>work as well as /dev/rmt0. The only difference between the two operations is
>that after using /dev/rmt0, the tape will rewind whereas for rmt0.1 it will
>not. We did restore the database archive using dd because we know that the
>first file is only a tape directory worth a few kilobytes but we had a 2GB
>file at the end of the dd restore.
>
>Our database is 2.6 GB. Is that the reason why our restores might be
>failing? What are my options for a database larger than 2 GB?
>
>Thanks!!!
>=========================================
>I'm a bit confused. Is /dev/rmt0.1 a no-rewind device? If so, you can't
>restore from it directly because ontape incorporates a rewind near the
>begining of its restore operations.
>
>So, one alternative is to dd to file system (provided the archive is <
>2GBytes in size). Which is what you've done, except, so far as I can see,
>you've not dd'd the ontape archive but whatever's at the beginging of the
>tape.
>
>Shouldn't you be doing?:
>mt -t /dev/rmt0 rewind
>mt -t /dev/rmt0.1 fsf 1
>dd if=/dev/rmt0.1 of=/temp/ddarc bs=16k
>
>Or am I missing something?
>
>Neil Truby
>Londis Stores
>Hampton Hill, UK
>
>==================================================
>
>Rajesh wrote in message <384001e6_4@news1.prserv.net>...
>>I am new to Informix Database Administration. We are running Informix 7.24
>>on RS-6000 AIX version 4.2.1.0. Our daily backup scripts stack the level 0
>>archives on device /dev/rmt0.1. We are trying to restore a level 0 archive
>>from the tape to a newly built system as follows....
>>
>>mt -t /dev/rmt0 rewind
>>mt -t /dev/rmt0.1 fsf 1
>>
>>We then changed the onconfig file to point TAPEDEV to /dev/rmt0.1 and
>>started the "ontape -r". The initial dbspace information is displayed and
>>the program asks if we would like to proceed followed by if we would like
>to
>>save the last log. After this, the restore simply comes back with the
>>"program ended" message with no diagnostics.
>>
>>We then tried to use dd to restore the archive to disk and then use it from
>>there.
>>
>>dd if=/dev/rmt0 of=/temp/ddarc bs=16k
>>
>>The file restores to disk but after changing the TAPEDEV to /temp/ddarc and
>>starting "ontape -r", the program simply does not even show the dbspace
>>information. It simply gives error opening /temp/ddarc file message with an
>>error code 1 and stops.
>>
>>Anyone faced these problems before? Restoring a database from a tape should
>>be a fairly standard procedure.
>>
>>Thanks!!!
>>
>>
------------------------------------------------------------
This e-mail has been sent to you courtesy of OperaMail, as a free service from
Opera Software, makers of the award-winning Web Browser, Opera. Visit us at
http://www.opera.com/ or our portal at: http://www.myopera.com/ Your free e-mail
account is waiting at: http://www.operamail.com/
------------------------------------------------------------