Re: help ontape -r failed
Posted in 1999
You can try like
mkfifo /saveinfx/pipe/pfile
dd if=/saveinfx/base/myfirstdbsave.dat of=/saveinfx/pipe/pfile bs=512k &
Thanks,
"Art S. Kagel" wrote:
> Joel QUIDORT wrote:
> >
> > Hi,
> >
> > I've heard that it's possible to use ontape with named pipe
> >
> > So I create some directories
> >
> > /saveinfx/pipe/
> > /saveinfx/base/
> >
> > Modify my onconfig
> > # System Archive Tape Device
> > TAPEDEV /saveinfx/pipe/pfile # Tape device path
> > TAPEBLK 512 # Tape block size (Kbytes)
> > TAPESIZE 10000384 # Maximum amount of data to put on tape
> > (Kbytes)> >
> > Then done as informix user some by hand and the rest by script
> > /etc/mknod /saveinfx/pipe/pfile p
> > chmod 660 /saveinfx/pipe/pfile
> > dd if=/saveinfx/pipe/pfile of=/saveinfx/base/myfirstdbsave.dat bs=512k &
> > ontape -s -L 0> >
> > Seems to work fine, and i got a "myfirstdbsave.dat" file of a certain size.
> >
> > now trying to do some restore
> >
> > rm /saveinfx/pipe/pfile
> > /etc/mknod /saveinfx/pipe/pfile p
> > chmod 660 /saveinfx/pipe/pfile
> > dd if=/saveinfx/base/myfirstdbsave.dat of=/saveinfx/pipe/pfile bs=512k &
> >
> > ontape -r> >
> > Please mount tape 1 on /saveinfx/pipe/pfile and press Return to continue ...
> > # I press return here
> >
> > Archive Tape Information
> >
> > Tape type: Archive Backup Tape
> > Online version: Informix Dynamic Server Version 7.30.UC2
> > Archive date: Sun Jul 18 22:33:40 1999
> > User id: informix
> > Terminal id: ?
> > Archive level: 0
> > Tape device: /saveinfx/pipe/pfile
> > Tape blocksize (in k): 512
> > Tape size (in k): 10000384
> > Tape number in series: 1
> > Physical restore failed - function read archive backup failed code -2 errno
> > 22
> >
> > Program over.
> >
> > Why it doesnt work ????
> >
> > I'm running Informix Dynamic Server Version 7.30.UC2, on SCO OSR 5.04 box.
> >
> > I know that other tools exists but I'm looking forward for an explanation,
> > because
> > I'll have to maintain some scripts soon for my job.
>
> Ontape expects to be able to close and reopen the "tape" several times
> and have it rewind to the beginning each time. The dd you are using
> does not understand that. For restores pipes are VERY hard to use it
> would be better to restore directly from the file you created during
> the backup.
>
> Art S. Kagel
--
===============================================================
Umesh Patel
On Assignment with Caliber Logistics-
===============================================================