Backing Up Informix on Solaris
Posted in 1999
Question: Informix 7 ontape on Solaris doesn't support no-rewind tape devices (/dev/rmt/0n), so how can two separate instances share one tape, and can you restore from it? Answers: ontape rewinds (it reads a few blocks then rewinds) so restoring directly from a second archive isn't supported; recommended options were archiving to disk and then copying those files to tape, or writing multiple archives to one tape and dd'ing the second one off before restoring. Roland Wartenberg offered a workaround: set TAPEDEV to /dev/rmt/0cbn, position with 'mt fsf n', run 'ontape -r', and at the "Start Restore" prompt do 'mt bsf 2' from another shell. Art Kagel doubted it, but Roland and another poster reported testing it successfully (ontape reads the archive exactly twice). The issue is also covered in the FAQ section 6.34.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Backup & Restore, Platform-Specific Issues
I have a Sun E3000 running 2 Informix 7 databases. I am unfamiliar
with Informix and find that the 'ontape' utility does not support 'non
rewind' devices in Solaris such as '/dev/rmt/0n'.
My question is......
If this is true, how can I backup to seperate databases to the same
backup device.
There is also a followup question in.......
I am also lead to believe that 'ontape' also forwards through the data
on the tape before rewinding and begining the actual restore, if this
is the case how would I restore from the same device?
Cheers in advance
Neil Neil Orange Peel
Unix Admin & Limey Hippy
;)~
V Page wrote:
> I have a Sun E3000 running 2 Informix 7 databases. I am unfamiliar
> with Informix and find that the 'ontape' utility does not support 'non
> rewind' devices in Solaris such as '/dev/rmt/0n'.
>
> My question is......
>
> If this is true, how can I backup to seperate databases to the same
> backup device.
It is true. And you don't use ontape to backup separate databases to the
same backup device, if you mean that the databases are on separate OnLine
instances. Separate databases in the same OnLine instance are
automatically backed up together.
You could use ontape to backup to disk (yes, yes, this is supported) and
then backup the disk files to the same backup device.
> There is also a followup question in.......
>
> I am also lead to believe that 'ontape' also forwards through the data
> on the tape before rewinding and begining the actual restore, if this
> is the case how would I restore from the same device?
It doesn't completely go forward through the data, but it does read a few
blocks at the beginning, and then rewind, so the answer is, you cannot
restore from the same device. That is precisely why no-rewind devices are
not supported.
Crikey, I said I was going to add this to the FAQ, didn't I.
June
--
june_t@hotmail.com
Grounded in Palo Alto, living on KitKat bars
V Page wrote in message <369a90c3.3636636@news.u-net.com>...
>I have a Sun E3000 running 2 Informix 7 databases. I am unfamiliar
>with Informix and find that the 'ontape' utility does not support 'non
>rewind' devices in Solaris such as '/dev/rmt/0n'.
>
>My question is......
>
>If this is true, how can I backup to seperate databases to the same
>backup device.
You CAN back up multiple database servers to the same tape. For example,
server 1 to /dev/rmt/0 and server to the scond archive on the tape
(/dev/rmt/0n). However, you wouldn't be able to restore directly from the
second archive (becuase of the ontape / /dev/rmt/0n problem you mention);
you would need to dd it out to disk or another tape first.
Although it sounds a bit iffy I have used this technique successfully at
other sites. It lends itself well to a situation where the second database
server archive is small releative to the first, and I commend it to your
attention.
Neil Truby
aracnet Limited
Weybridge, UK
V Page schrieb in Nachricht <369a90c3.3636636@news.u-net.com>...
>I have a Sun E3000 running 2 Informix 7 databases. I am unfamiliar
>with Informix and find that the 'ontape' utility does not support 'non
>rewind' devices in Solaris such as '/dev/rmt/0n'.
>
>My question is......
>
>If this is true, how can I backup to seperate databases to the same
>backup device.
>
>There is also a followup question in.......
>
>I am also lead to believe that 'ontape' also forwards through the data
>on the tape before rewinding and begining the actual restore, if this
>is the case how would I restore from the same device?
>
>Cheers in advance
>
>Neil Neil Orange Peel
>Unix Admin & Limey Hippy
>;)~
Hi,
we have three different SAP R/3 systems with 7.24 and
7.30 Informix database on our test system (SUN, op 2.6).
We're using ontape to backup them, all three together on
one tape.
In the ONCONFIG files, we set TAPEDEV to '/dev/rmt/0cbn'.
We're doing the backup using 'ontape -s -L 0' and it works
without problems.
After running the backup script there are the following data
on the tape:
position
0 ufsdump 0uf /dev/rmt/0cbn /dev/dsk/c0t0d0s0
1 ufsdump 0uf /dev/rmt/0cbn /dev/dsk/c0t0d0s3
2 ufsdump 0uf /dev/rmt/0cbn /dev/dsk/c2t0d0s3
3 ufsdump 0uf /dev/rmt/0cbn /dev/dsk/c0t0d0s5
4 ufsdump 0uf /dev/rmt/0cbn /dev/dsk/c0t0d0s6
5 ufsdump 0uf /dev/rmt/0cbn /dev/dsk/c3t0d0s3
6 ufsdump 0uf /dev/rmt/0cbn /dev/dsk/c4t0d0s3
7 tar cvf /dev/rmt/0cbn /usr/sap/ctrans
8 tar cfv /dev/rmt/0cbn /informix/onconfig
9 YI0 (7.30UC5): ontape -s -L 0
10 YI1 (7.30UC5): ontape -s -L 0
11 YI2 (7.24UC5): ontape -s -L 0
When we want to restore one of the databases we have
to forward the tape using 'mt fsf <position>' and to start
'ontape -r'. When ontape asks you 'Start Restore' use another
shell to do a 'mt bsf 2' to rewind the tape to the start
position of the database backup and all should work fine.
Regards,
Roland
Roland Wartenberg; SAP AG, P.O. Box 1461, D-69185 Walldorf
R/3 Advanced Technology Group; email: Roland.Wartenberg@sap-ag.de
Thanks very much for the advise....rolling my sleves up as we speak.
Many rgds
Neil aka Orange Peel ;)~
On Tue, 12 Jan 1999 00:06:47 GMT, vixter@eatstatic.u-net.com (V Page)
wrote:
>I have a Sun E3000 running 2 Informix 7 databases. I am unfamiliar
>with Informix and find that the 'ontape' utility does not support 'non
>rewind' devices in Solaris such as '/dev/rmt/0n'.
>
>My question is......
>
>If this is true, how can I backup to seperate databases to the same
>backup device.
>
>There is also a followup question in.......
>
>I am also lead to believe that 'ontape' also forwards through the data
>on the tape before rewinding and begining the actual restore, if this
>is the case how would I restore from the same device?
>
>Cheers in advance
>
>Neil Neil Orange Peel
>Unix Admin & Limey Hippy
>;)~
Roland Wartenberg wrote:
> V Page schrieb in Nachricht <369a90c3.3636636@news.u-net.com>...
[SNIP]
> Hi,
> we have three different SAP R/3 systems with 7.24 and
> 7.30 Informix database on our test system (SUN, op 2.6).
> We're using ontape to backup them, all three together on
> one tape.
> In the ONCONFIG files, we set TAPEDEV to '/dev/rmt/0cbn'.
> We're doing the backup using 'ontape -s -L 0' and it works
> without problems.
> After running the backup script there are the following data
> position
[SNIP]
> When we want to restore one of the databases we have
> to forward the tape using 'mt fsf <position>' and to start
> 'ontape -r'. When ontape asks you 'Start Restore' use another
> shell to do a 'mt bsf 2' to rewind the tape to the start
> position of the database backup and all should work fine.
Have you actually tested this procedure? Because I am fairly certain
that AFTER prompting 'Start Restore' ontape closes and reopens the
device again at least once more expecting that the device will
magically rewind. In this case the procedre would fail!
Art S. Kagel
Art S. Kagel schrieb in Nachricht <369BBEFA.57AF@bloomberg.net>...
>Roland Wartenberg wrote:
>
>> V Page schrieb in Nachricht <369a90c3.3636636@news.u-net.com>...
>[SNIP]
>> Hi,
>
>[SNIP]
>Have you actually tested this procedure? Because I am fairly certain
>that AFTER prompting 'Start Restore' ontape closes and reopens the
>device again at least once more expecting that the device will
>magically rewind. In this case the procedre would fail!
Yes, we tested it and we are using it to go back to the 'status quo'
after modfying and testing our systems.
Regards,
Roland
In article <369AC98D.6C3534FA@hotmail.com>, June Tong
<june_t@hotmail.com> writes
>V Page wrote:
>
>> I have a Sun E3000 running 2 Informix 7 databases. I am unfamiliar
>> with Informix and find that the 'ontape' utility does not support 'non
>> rewind' devices in Solaris such as '/dev/rmt/0n'.
>>
>> My question is......
>>
>> If this is true, how can I backup to seperate databases to the same
>> backup device.
>
>It is true. And you don't use ontape to backup separate databases to the
>same backup device, if you mean that the databases are on separate OnLine
>instances. Separate databases in the same OnLine instance are
>automatically backed up together.
>
>You could use ontape to backup to disk (yes, yes, this is supported) and
>then backup the disk files to the same backup device.
>
>
>> There is also a followup question in.......
>>
>> I am also lead to believe that 'ontape' also forwards through the data
>> on the tape before rewinding and begining the actual restore, if this
>> is the case how would I restore from the same device?
>
>It doesn't completely go forward through the data, but it does read a few
>blocks at the beginning, and then rewind, so the answer is, you cannot
>restore from the same device. That is precisely why no-rewind devices are
>not supported.
>
>Crikey, I said I was going to add this to the FAQ, didn't I.
>
Too late, beat you
section 6.34 Why does ontape dislike norewind devices?
in the Official FAQ
^^^^^^^
www.smooth1.demon.co.uk
PS My work colleagues have discovered my Home Page !! Guess who found
his photo printed out on his desk today?? Guess who has several e-mails
from a certain work colleagues (Mukie!) and has been subscribed to
several mailing lists without his knowledge!! Arrgh!
>June
>--
>june_t@hotmail.com
>Grounded in Palo Alto, living on KitKat bars
>
>
--
David Williams
David Williams wrote:
> In article <369AC98D.6C3534FA@hotmail.com>, June Tong
> <june_t@hotmail.com> writes
> >That is precisely why no-rewind devices are
> >not supported.
> >
> >Crikey, I said I was going to add this to the FAQ, didn't I.
> >
>
> Too late, beat you
Oh, good ;-)
> section 6.34 Why does ontape dislike norewind devices?
>
> in the Official FAQ
> ^^^^^^^
>
> www.smooth1.demon.co.uk
Can't seem to get there from here. When will it be on www.iiug.org?
June
--
june_t@hotmail.com
Grounded in Palo Alto, living on animal crackers
Hi. Does anyone else have any comment on Roland Wartenberg's patent
method? I've tried it on a Solaris 2.5 system running Informix 7.1, and
it works fine, which surprised me. When restoring, Informix reads the
archive file exactly twice, so you just need to position the tape
correctly before each of the two reads.
Fair enough, it's a bit messy, but then so are the various methods
people use to back up Informix servers unattended, by piping in
linefeeds to 'ontape', or using a TCL/Expect script. I reckon that with
a bit of scripting, and practice, recovering a server from an archive
halfway through a no-rewind tape should be pretty easy.
--
Peter Wotherspoon