Gzipping ontape backups
Posted in 2000
Topics: Backup & Restore
Hi Group
Does any one know of a way to get ontape to read back from a pipe? I
have no trouble gzipping it up it is roughly getting 50gig down to 5
gig which is saving me a lot of space and now I can keep a weeks worth
of backs ups on filesystems as well as tapes. The only fallback is that
when I have to restore them I have to uncompress them to a tape before I
can read them back with ontape -r, it would be nicer just to bring it
back from the same pipe I sent it to but unfortunatlely it halts after
reading in the first block of the dd. I know this is unsupported but
would appreciate any ideas anyone has,
Greg Elphick wrote:
>
> Hi Group
>
> Does any one know of a way to get ontape to read back from a pipe? I
> have no trouble gzipping it up it is roughly getting 50gig down to 5
> gig which is saving me a lot of space and now I can keep a weeks worth
> of backs ups on filesystems as well as tapes. The only fallback is that
> when I have to restore them I have to uncompress them to a tape before I
> can read them back with ontape -r, it would be nicer just to bring it
> back from the same pipe I sent it to but unfortunatlely it halts after
> reading in the first block of the dd. I know this is unsupported but
> would appreciate any ideas anyone has,
Use a FIFO.
awk '/TAPEDEV/{print "TAPEDEV /tmp/archive.fifo";next;}{print $0;}' <$ONCONFIG
>C.tmp
mv C.tmp $ONCONFIG
mkfifo /tmp/archive.fifo
gunzip -c archive.file.gz >/tmp/archive.fifo
ontape -r
In article <3977598E.BCF7B06A@bloomberg.net>, "Art S. Kagel"
<kagel@bloomberg.net> writes
>Greg Elphick wrote:
>>
>> Hi Group
>>
>> Does any one know of a way to get ontape to read back from a pipe? I
>> have no trouble gzipping it up it is roughly getting 50gig down to 5
>> gig which is saving me a lot of space and now I can keep a weeks worth
>> of backs ups on filesystems as well as tapes. The only fallback is that
>> when I have to restore them I have to uncompress them to a tape before I
>> can read them back with ontape -r, it would be nicer just to bring it
>> back from the same pipe I sent it to but unfortunatlely it halts after
>> reading in the first block of the dd. I know this is unsupported but
>> would appreciate any ideas anyone has,
>
>Use a FIFO.
>
>awk '/TAPEDEV/{print "TAPEDEV /tmp/archive.fifo";next;}{print $0;}' <$ONCONFIG
>>C.tmp
>mv C.tmp $ONCONFIG
>mkfifo /tmp/archive.fifo
>gunzip -c archive.file.gz >/tmp/archive.fifo
>ontape -r
Sorry for my ignorance, but how would this solution differ if you were
to restore from a file instead?
Thanks.
Andrew Lennard andy@kontron.demon.co.uk
Forget the whole idea. I don't know where my head was at the other
day! You cannot restore from a pipe without a custom app to write
the archive to the pipe. The problem, I forgot, is that ontape
opens and closes the archive device/file several times expecting it
to rewind in the process. You'd need a custom app to detect the
closure, drain the pipe and resent the archive from the beginning.
Just using gzip won't work. <Begin Don Adams voice> Sorry about
that. <End voice mutation>
Art S. Kagel
Andy Lennard wrote:
>
> In article <3977598E.BCF7B06A@bloomberg.net>, "Art S. Kagel"
> <kagel@bloomberg.net> writes
> >Greg Elphick wrote:
> >>
> >> Hi Group
> >>
> >> Does any one know of a way to get ontape to read back from a pipe? I
> >> have no trouble gzipping it up it is roughly getting 50gig down to 5
> >> gig which is saving me a lot of space and now I can keep a weeks worth
> >> of backs ups on filesystems as well as tapes. The only fallback is that
> >> when I have to restore them I have to uncompress them to a tape before I
> >> can read them back with ontape -r, it would be nicer just to bring it
> >> back from the same pipe I sent it to but unfortunatlely it halts after
> >> reading in the first block of the dd. I know this is unsupported but
> >> would appreciate any ideas anyone has,
> >
> >Use a FIFO.
> >
> >awk '/TAPEDEV/{print "TAPEDEV /tmp/archive.fifo";next;}{print $0;}' <$ONCONFIG
> >>C.tmp
> >mv C.tmp $ONCONFIG
> >mkfifo /tmp/archive.fifo
> >gunzip -c archive.file.gz >/tmp/archive.fifo
> >ontape -r>
> Sorry for my ignorance, but how would this solution differ if you were
> to restore from a file instead?
>
> Thanks.
>
> Andrew Lennard andy@kontron.demon.co.uk
Sorry if it seems a little hazy but a lot of people just dont have 50 or so
Gig just lying around to uncompress files to. Hence restoring straight from
a pipe without uncompressing the file to the filesystem. The ontape process
is reading straight from stdout which is faster than reading from a tape
device. I have found the work around for the problem (well it works for me
anyway)