I have a problem that I hope someone here could point out my mistake or
something.

I have a real simple script that I threw together to do some backups
via tar (v1.12 GNU) & ssh (v1.2.26) to a remote machine with a tape
drive attached.


Now I've checked and I can connect up to the remote machine just fine
with ssh, scp, et al.  no problems there manually.  I've also checked
the tape drive and device files on the remote machine they work fine
and I can backup locally to that machine without a problem as well.

When running this I do not appear to be getting a password prompt
from ssh which to me means it's dying before it even gets to touch
the device file.  (I don't have anything set up to be 'auto-login'
with ssh.  everyone has to enter a password to get into a system.

Now this used to work a while ago (5 months) but so much has changed
I won't insult anyone's intelligence as to that (upgraded from 2.0.*
to 2.2.1, all the re-compiles et al).


Steve


The output:
------------
ftp.chaven.com: Connection refused
tar: Cannot open ftp.chaven.com:/dev/st0: Illegal seek
tar: Error is not recoverable: exiting now


The script:
-----------
#!/bin/sh

TAR=tar
HOST=`hostname`
LENGTH=24000000
EXCLUDE=/etc/backup.ignore
TAPE=ftp:/dev/st0
LOCALTAPE=/dev/st0
LOG=/var/log/backup.log
RSH=/usr/bin/ssh

case $HOST in
www)
echo "Backing up $HOST..."
tar --rsh-command=$RSH --tape-length=$LENGTH --exclude-from=$EXCLUDE -cvpRMf
$TAPE / > $LOG 2>&1
;;
shell)
echo "Backing up $HOST..."
tar --rsh-command=$RSH --tape-length=$LENGTH --exclude-from=$EXCLUDE -cvpRMf
$TAPE / > $LOG 2>&1
;;
news)
echo "Backing up $HOST..."
tar --rsh-command=$RSH --tape-length=$LENGTH --exclude-from=$EXCLUDE -cvpRMf
$TAPE / > $LOG 2>&1
;;
ftp)
echo "Backing up $HOST..."
tar --tape-length=$LENGTH --exclude-from=$EXCLUDE -cvpRMf $LOCALTAPE / >
$LOG 2>&1
;;
*)
echo "Unknown node $HOST... Aborting."
exit 1
esac

-------------

Reply via email to