On Wednesday 05 November 2003 06:26, Mike Brodbelt wrote:
>Hi,
>
>I use Amanda to back up to a Quantum DLT 35/70. I used to use
> hardware compression, but am now using software based compression
> on the tape server. I tunr off compression on the drive, but it
> won't stay off, as each night it reads the header from the previous
> backup, and switches back into hardware compressed mode. Can anyone
> give me a simple technique for forcing compression to stay off.....
>
>Thanks,
>
>Mike.
basicly, what you must do is to work outside of amanda to do this.
I don't know how many tapes you have, but I wrote this script a while
back to do a similar operation.
#!/bin/sh
if [ `whoami` != 'root' ]; then
echo
echo "!!!!!!!!!!!!!!!!! Warning !!!!!!!!!!!!!!!!!!"
echo "fixblock needs to be run by the user root,"
echo "else the perms on some commands will be denied."
echo
exit 1
fi
name=./status
set echo on
# needs a scratch dir to hold temp files
cd /amanda
# blatently stolen from the bash manual
NUMBERS="0 1 2 3"
for number in $NUMBERS
do
echo "amtape DailySet1 slot "$number
su amanda -c 'amtape DailySet1 slot '$number
mt -f /dev/nst0 rewind
# save the tapes label for amanda, /dev/st0 rewinds
dd if=/dev/st0 of=./scratch bs=64K count=1
# show the label read
ls -l ./scratch
mt -f /dev/nst0 setblk 32768
mt -f /dev/nst0 defblksize 32768
mt -f /dev/nst0 compression off
mt -f /dev/nst0 defcompression -1
# now write label back. Remove bs and conv if not changing blocksize
dd if=./scratch of=/dev/nst0 bs=32K conv=sync
# echo current location on tape for your enjoyment
mt -f /dev/nst0 tell
# Now This _should_ get rid of compressed headers
echo "forcing buffer flush with an 4+ meg write to tape # "$number
# note use of st0, it rewinds
dd if=/dev/zero bs=32K count=130 of=/dev/st0
echo "Now reading the label"
dd if=/dev/st0 bs=32K
mt -f /dev/st0 status
done
exit 0
----------------------------------
Now, if you do not want to run with the larger block size, remove
those 2 mt lines and the bs options for the dd based usage.
What its doing is turning off the compression, and then forcing a
buffer flush, which in turn writes the new, non-compressed flags into
the otherwise hidden tape header.
It works for me :-)
--
Cheers, Gene
AMD K6-III@500mhz 320M
Athlon1600XP@1400mhz 512M
99.27% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attornies please note, additions to this message
by Gene Heskett are:
Copyright 2003 by Maurice Eugene Heskett, all rights reserved.
|