[wplug] tar: Error exit delayed from previous errors

Rafael E. Herrera raffo at neuronet.pitt.edu
Sun Feb 25 14:27:51 EST 2001


/dev/st0 is the rewind device and /dev/nst0 the no rewind, after you use
st0 the tape will be re-wound.

I have used this in the past; note that I don't use compression.

#!/bin/bash

# Create tar file
echo -e "Backing-up Rafael's home directories."
date=`date "+%Y%m%d-%H_%M"`
errfile="/tmp/$date.backup.err"
logfile="/tmp/$date.backup.log"
name=".last_backup_on_$date"
for dir in raffo ; do
  last$disr=`ls /home/$dir/.last_backup_on_*` && mv $last$dir
${last}$dir_old;
  touch /home/$dir/$name;
done

echo > $logfile
echo > $errfile
echo >> $errfile
echo >> $logfile

(cd /home && tar cvpf /dev/st0 raffo >> $logfile 2>> $errfile)

echo -e "Done."
echo -e "Errors writen to $errfile"
echo -e "File list writen to $logfile"

Try using tar only with st0 and don't run mt. The commands you use seem
OK, one minor detail, which may be of no importance, the parameters for
tar don't nead a leading dash, so

	tar cvzf /dev/st0 file1 file2 ...

should work.

-- 
     Rafael



More information about the wplug mailing list