[H-GEN] Tape Drives

Jason Henry Parker jasonp at uq.net.au
Mon Jan 7 07:06:54 EST 2002


[ Humbug *General* list - semi-serious discussions about Humbug and  ]
[ Unix-related topics.  Please observe the list's charter.           ]
[ Worthwhile understanding: http://www.humbug.org.au/netiquette.html ]

"Michael Anthon" <michael at anthon.net> writes:

> The other method I have used is to use something like 'tar c stuff |
> gzip -9 | dd of=/dev/tape'.  It's a little heavy on the CPU usage,
> but in the middle of the night, who cares?

Of course, you don't want to do anything like that if hardware
compression is still turned on.  -9 may also be a bit excessive.

On the whole I've found that gzip does a better job than the hardware
compression on the drive I'm using.  Apparently the `window' available
to the hardware compression routines is pretty small, decreasing the
amount of data that can be used to effect savings.

> The main reason I did this instead of using the drive compression
> was that the version of tar on the system in question had problems
> handling a few largish files.

Right.

A nice little trick:

dd if=/dev/nst0 bs=32k | tee >(split --bytes=1000m backup-image-) | restore...

Just in case you screw up the restore, the backup image will be
stashed away on the filesystem in convenient blocks of slightly less
than 1GB, which can be concatenated to pipe right back into the
restore program.

> To add another thought into the tape vs. HDD argument... if you have to back
> up a database, quite often the database needs to be taken offline if you
> wish to make a backup of it's data files.

Another alternative is to ask the database to dump to flat files every
day, and back up these (as well as the binary files which are
hopefully idle).  It's neither scalable nor reliable, but seems to
work well for small shops.

> [2] As an aside, does anyone have any clue as to how to determine the
> remaining capacity on a tape?  It's something that's bugged me for a while
> and I can't find an answer to it.

I'm not sure it's possible with hardware compression.  This is the
best reason I can think of to compress backup image before they go to
tape---you'll always know *exactly* how much space is left for you to
write onto.

If hardware compression is turned off, I guess you could count the
number of blocks, and ask mt to tell you where the end of media? end
of file? is.

jason
-- 
||----|---|------------|--|-------|------|-----------|-#---|-|--|------||
| Men are Figs!                               http://linux.org.au/conf/ |
|                   --Ann Burlingham                   jasonp at uq.net.au |
||--|--------|--------------|----|-------------|------|---------|-----|-|

--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.



More information about the General mailing list