Re: Ontape and named pipes
Posted in 1997
Rick Ward wrote:
>
> Spencer, Bill wrote:
> >
> > Hi there,
> > I am trying to utilise named pipes with the ontape utility to provide
> > fast disk backup and restore with compression/uncompression 'on the fly'.
> >
> > The backup script works fine, however i am wondering how
> > to implement the restore part .
> > The ontape utility works fine when reading a disk file
> > but what do you do when reading from a named pipe.
> >
> > Any suggestions would be helpful, even if it is to say
> > it can;t be done.
> >
> > Bill Spencer.
>
> I have experimented with this also, to save disk space when archiving. In order to restore the
> archive from a compressed file through a named pipe to into ontape, I did the following:
>
> (uncompress -cf arcfile > pipefile;uncompress -cf arcfile > pipefile) &
> ontape -r <<h &>
> y
> n
> n
> n
> h
>
> This is a rather crude way of restoring, but it worked for me, BUT ONLY FOR LEVEL 0 restores. I
> never managed to get Level 1 or 2 restores working in an automated manner.
>
> The y n n n are replies to the questions:
> Continue ?
> Backup logical logs ?
> Restore Level 1 ?
> Restore Logs ?
>
> Obviously change these if you have different requirements.
>
> The double uncompress is required because (I think) ontape "rewinds" the tape and reads the archive
> information first to display to you followed by the message "Continue ?". It then closes the file
> which breaks the named pipe. The second uncompress then satisfies your reply "Y".
>
> This all worked for V7.12, but if you have any queries you can e-mail me direct (wardr@gusco.com).
>
> Good luck.
> --
> Rick Ward
> Senior DBA
> Great Universal Stores Home Shopping
> MANCHESTER, UK
Not in the HEART of this problem, but : use gzip, it shrinks the files
much better than compress....
(sorry for bothering you...)
--
Valery Fouques valou@hotmail.com
SYSADM GOSPORT-FRANCE /\\oO/\\
_ __/|
\\`O.o' "355/113 -- Not the famous irrational
=(_ _)= number PI, but an incredible simulation!"
U