[KLUG Members] backing up

Dirk H Bartley members@kalamazoolinux.org
Fri, 05 Oct 2001 09:51:24 -0400


Adam Williams wrote:
> 
> >>>I am having a little trouble backing up.  I am using tar as follows:
> >>>tar -cvzpf /dev/st0 -T /root/backup/whattobackup
> >>>when I restore the files with :
> >>>tar -xvzpf /dev/st0 it restores and then hangs.  When I try backup and then
> >>>restore a small amount of data it completely hangs and fails on the restore.
> >>>(control c stops the hang.)
> >>>The tape device is a 4mm dat.  Here is from dmesg
> >>>Vendor: SEAGATE   Model: DAT    06240-XXX  Rev: 8160
> >>>Type:   Sequential-Access                  ANSI SCSI revision: 03
> >>>Anyone have any ideas for why it is hanging at the end of long restores and not
> >>>restoring small backups at all?
> >>No, but I had the EXACT same thing with the EXACT same tape drive.
> >>Fought with it forever.  A little TLC and the tape drive started eating
> >>the tapes and the OEM swapped it out as a bad unit.  Works great now.
> >So I should try and get it replaced then eh?
> >Bummer!
> 
> Yep.  Also make sure you have the most current firmware.  On my
> Netfinity servers I can go into the BIOS and do a diagnostic on the tape
> drive that reports all this information,  how to get it depends on you
> box and scsi card.
> 
> >>>On a side note, for network backups of files on a host without the tape drive,
> >>>what is your preferred method.  I have been using tar and ssh with some luck as
> >>>follows:
> >>>tar -czp TEST* | ssh srv2 'cat > /BAI.unidata/BAI.accounts/TEST.tgz'
> >>>but this is done to a file and not to a tape device.  Is it perfectly acceptable
> >>>to do this
> >>>tar -czp TEST* | ssh srv2 'cat > /dev/st0'
> >>No.  You should write to the tape drive with dd so you can set the block
> >>size.
> >so the command would look like
> >tar -czp TEST* | ssh srv2 'cat | dd of=/dev/st0 bs=32k
> 
> Why the "cat"?  Just use dd,  it reads from stdin just like cat.
> 
> >what block size should I use?
> 
> The size you set with "mf -f /dev/st0 setblk XYZ" in your init scripts.
> Larget blocks are faster and use space less efficiently,  and small
> blocks are slower and use space more efficiently.  I set my block size
> to 10248 on my 4mm drives.  Then I tell tar -b 10248 so it uses a
> matching block size,  just to be on the safe side.
> 
> >Then would I still restore with
> >tar -xvzf /dev/st0  ????
> 
> Other than compression in tar is evil, yes.

After using IBM's support, which was helpful at getting me to the place to do
all of the tests of the tape drive, I tried using tar without compression and a
small backup and restore.  tar without -z worked just fine backing up and
restoring even small amounts of data to this tape drive.  Does this mean I
should not be using software compression when backing up to this hardware?  I
ran test that told me the hardware compression on the tape drive is working. 
How do I know if hardware compression is functioning when using tar?  I looked
at the tape drive manual and did not see a dip for compression on or off.

Another question.  What is the best way to find out what percent of a tape I am
using.  Is there a command that will scan the tape and give me this information
I desire?

Dirk

> 
> >>>I also noticed from man tar that you can put a hostname before a tar.   -f,
> >>>--file [HOSTNAME:]F  What mechanism does this use and does it work/is it secure
> >>>like with ssh.
> >>rmt via rexec.  It is secure only on a Kerberos network,  on "standard"
> >>networks it is hilariously not secure.