home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pipex!bnr.co.uk!uknet!gdt!ccsis
- From: ccsis@sunlab1.bath.ac.uk (Icarus Sparry)
- Newsgroups: comp.unix.questions
- Subject: Re: Pipe cpio output through compress?
- Message-ID: <C0AFLK.9xI@sunlab1.bath.ac.uk>
- Date: 3 Jan 93 17:09:43 GMT
- References: <wZ9RwB3w164w@cellar.org>
- Organization: Bath University Computing Services, UK
- Lines: 27
-
- In the referenced article, toad@cellar.org (Tony Shepps) writes:
- >Would this be a suitable and cheap way to get compression on tape backups?
- >
- > # find . -print | cpio -ocv | compress >/dev/rmt/(tape device)
-
- Depends on the device driver for the tape device. If I were doing it I would
- use 'dd' to package up the output.
- e.g.
-
- find . -print | cpio -ocv | compress | dd 'of=/dev/rmt/(tape device)' 'obs=60k'
-
- If you don't use 'dd' then you get two effects.
- 1) The size of the blocks which you pass to the device driver may vary in
- size. Not a major problem but it can make reading them back a little difficult
- if your program is not written to expect differing size blocks. Also some
- primate device drivers get upset if you are not writing a multiple of 512
- bytes to a block device.
-
- 2) For typical tape devices you would not get anywhere near as much on a
- tape as you would expect due to 'inter block records' A tape drive wants
- to be able to start the motor, read the data, then stop the tape in order
- to read the block. The starting and stopping tape a finite amount of time,
- and therefore a finite amount of tape. If you only write a few hundred
- bytes, then the 'wasted' tape is much longer than the useful tape. Therefore
- if one could, one would like to write say a megabyte at a time. Unfortunately
- some systems are not able to process an I/O request for more than 64k at
- a time, hence the '60k' parameter.
-