Amanda-Users

Re: Compression

2007-04-03 23:25:21
Subject: Re: Compression
From: Gene Heskett <gene.heskett AT verizon DOT net>
To: amanda-users AT amanda DOT org
Date: Tue, 03 Apr 2007 23:20:35 -0400
On Tuesday 03 April 2007, Sebastian Henrich wrote:
>Hello,
>
>I'm using amanda 2.4.5 to backup my server. The tape is a HP DAT 72.
>This drives stores 36 GB of uncompressed data. I switched the
>hardware compression off and tried to use the software compression.
>Now I have the problem that amanda tells me every time
>
You may be getting bit by something I ran into several years ago now.

If the tape is written with the hardware compression on, then the drive 
will detect that and turn the compression on even if you think its turned 
off.  Then, when feeding it data that's already gzipped, the hardware 
compressor is powerless to compress it further, and may expand it a few 
percentage points with its attempts at compressing data that's already 
been smunched with gzip.

The usual cure works like this:

rewind the tape
read the header block out to a file with dd
rewind the tape
turn the compression off again
output, using dd, enough data from /dev/zero to cause the drive to have to 
flush its buffers, something in the 2 to 10 meg range should be enough, 
the point being that you turn the compressor off and don't move the tape 
until it has to flush its buffers.  At that point, that hidden 
compression flag will finally be turned off in the tape header.
rewind the tape again
Do an amtapetype -f /dev/ice -e 36GB, and copy the resulting size data 
into your tapetype define in your amanda.conf.
rewind it again
dd the tapes label block back onto the tape.

Do this for each tape that has been used with the compressor turned on, 
skipping the amtapetype step after the first tape.  And you will of 
course lose the data on that tape, so its probably a good idea to do this 
to each tape in the rotation in the hours before it will be re-used 
again.

rewind it again.
run amcheck to see if the label is indeed good, it should be.

gzip -best can compress some directories to less than 10% of their actual 
size.

Amanda also tracks the amount of compression on a per dle basis, so if you 
know beforehand the ratio, you can put it in the dumptype spec section to 
give amanda a head start on a good guess.

>INFO planner Incremental of server:/srv/samba/profile bumped to level 2.
>INFO planner server /home 20070404 0 [dumps too big, 15459005 KB,
>full dump delayed]
>
>Amanda is configured to do a full backup each time which is
>impossible at the moment. I tried to backup ~45 GB of well
>compressable data. Normally amanda should be able to store the files
>compressed on the tape.
>
>Has anybody some hints for me?
>
>   Thanks
>
>       Sebastian



-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
"Your mother was a hamster, and your father smelt of elderberrys!"
-- Monty Python and the Holy Grail

<Prev in Thread] Current Thread [Next in Thread>