tape drive error

Steven W. Orr steveo at syslang.net
Fri Feb 13 19:41:29 EST 2004


On Friday, Feb 13th 2004 at 15:44 -0500, quoth Charles Farinella:

=>On Fri, 2004-02-13 at 15:36, Steven W. Orr wrote:
=>
=>> Pray tell, what command is being executed when you run your backup?
=>
=>#!/bin/bash 
=>
=># Create backups 
=>PATH=/bin:/usr/bin:/usr/local/bin 
=>
=>backupdirs="/var/backups/"
=>
=>    
=>mt -f /dev/st0 rewind
=>for path in $backupdirs
=>do
=>    echo "System backup on $path" 
=>    tar cf /dev/nst0 $path 1>/dev/null
=>    sleep 2
=>done 
=>
=>echo "System backups complete, status: $?" 
=>echo "Now verifying system backups"  
=>
=>mt -f /dev/st0 rewind 
=>for path in $backupdirs
=>do
=>    echo "Verifying $path...." 
=>    tar tf /dev/nst0 1>/dev/null && \
=>        echo "$path: verified" || \
=>                echo "$path: errors in verify" 
=>
=>    if [ $? -eq 0 ]
=>        then echo "$path: verified"
=>                else echo "$path: error(s) in verify" 1>&2
=>    fi
=>    mt -f /dev/st0 fsf 1
=>done 
=>
=>mt -f /dev/st0 rewind 
=>
=>echo "Backup Complete." 

Besides needing to read from /dev/style, take a look at the tar info page, 
and specifically look at the -b option for setting the blocksize. Also 
look at the mt command with a blank tape in the drive and play with the 
status command and anything else that refers to blocksize.

-- 
Time flies like the wind. Fruit flies like a banana. Stranger things have  .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net



More information about the gnhlug-discuss mailing list