In this server, there are installed a Seagate Travan tape station (10/20 GB)
The server are located in Sweeden, and i'm in Norway..
I want to set up my backup station to take backup of the server.
in my /etc/init.d folder i have a backup script,
-------------------------------script ---------------------------------
#
backup() {
if [ "$TIME" = "now" ]
then
echo `tput cup 22 0` "Rewinding - Please wait" `tput ed`
# tar -cvfb "$TAPE" 20 / 2>&1|tee $HOME/XBX.$CFS_TML
date > $HOME/XBX.$UNIX_TTY
find . -name "*" -print|cpio -oBcv > "$TAPE"
date >> $HOME/XBX.$UNIX_TTY
cpio -iBctv < "$TAPE" >> $HOME/XBX.$UNIX_TTY
date >> $HOME/XBX.$UNIX_TTY
# while [ "$PRT" != "" ]
# do
mailx -s "Backuplog from Sweeden" freddy@mailaddress <
$HOME/XBX.$CFS_TML
echo "OK"
# lp -dlp$PRT $HOME/XBX.$CFS_TML
break
# done
else
echo `tput cup 22 0` "Backup will start at $TIME" `tput ed`
at $TIME >$HOME/XBX.$CFS_TML 2>&1 <<!
# tar -cvfb "$TAPE" 20 / >> $HOME/XBX.$CFS_TML 2>&1
date > $HOME/XBX.$UNIX_TTY
find . -name "*" -print|cpio -oBcv > "$TAPE"
date >> $HOME/XBX.$UNIX_TTY
cpio -iBctv < "$TAPE" >> $HOME/XBX.$UNIX_TTY
date >> $HOME/XBX.$UNIX_TTY
while [ "$PRT" != "" ]
do
lp -dlp$PRT $HOME/XBX.$CFS_TML
break
done
!
fi
}
TAPE=/dev/rct0
DIR="/tmp"
FILE=""
ITAPE="/dev/rct0"
cd /
tput clear
echo `tput cup 2 0` `tput rev` "TAPE BACKUP UTILITY (CPIO Vers)" `tput sgr0`
echo `tput cup 5 0` "Required Tape Drive:" `tput ed`
echo `tput cup 5 22` "$TAPE"
echo `tput cup 5 22` "\c"
#read ITAPE
if [ "$ITAPE" != "" ]
then
TAPE=$ITAPE
fi
echo `tput cup 5 22` "$TAPE" `tput el`
echo `tput cup 22 0` "Tape $TAPE Ready? Y/N: \c"
#read YORN
echo `tput cup 22 0` `tput ed`
YORN="y"
case $YORN in
Y|y)
echo `tput cup 7 0` "(B)ackup, (R)estore or (D)irectory ? \c"
# read ACTION
ACTION="b"
if [ "$ACTION" != "" ]
then
case $ACTION in
B|b)
echo `tput cup 9 0` "Directory Names:"
echo `tput cup 9 22` `tput el` "/"
PRT=""
echo `tput cup 22 0` `tput ed`
echo `tput cup 22 0` "Print Backup? Y/N: \c"
# read ANS
ANS1="y"
ANS="n"
while [ "$ANS1" = "Y" -o "$ANS1" = "y" ]
do
echo `tput cup 22 30` "Printer: lp\c"
#read PRT
break
done
echo `tput cup 22 0` `tput ed`
echo `tput cup 22 0` "Delay Backup? Y/N: \c"
# read ANS
TIME="now"
while [ "$ANS" = "Y" -o "$ANS" = "y" ]
do
echo `tput cup 22 0` "Time Now: " `date +%H:%M`
`tput el`
echo `tput cup 22 30` "Enter Required Time: (hh:mm)
\c"
read TIME
break
done
backup
;;
R|r)
echo `tput cup 9 0` "Enter File Names:"
echo `tput cup 22 0` "Leave blank for all Files" `tput ed`
echo `tput cup 9 22` `tput el` "\c"
# read FILE
# tar -xvf "$TAPE" ${FILE} 2>&1|tee $HOME/XBX.$CFS_TML
cpio -iBcdmuv ${FILE} < "$TAPE"
echo `tput cup 22 0` "Rewinding - Please wait" `tput ed`
;;
D|d)
# tar -tvf "$TAPE" 2>&1|tee $HOME/XBX.$CFS_TML
cpio -iBctv < "$TAPE" |pg
echo `tput cup 22 0` "Rewinding - Please wait" `tput ed`
;;
esac
echo `tput cup 22 60` "Press Return\c"
# read ACTION
fi
esac
#tput clear
---------------------------------end of script.----------------------------
This script works for a while, then i stops, asking for tape2, but the tape
should take 10GB without comp.
There are only one 9GB harddrive in the server..
What block size should i use, can i use another script that formats the tape
before running backup etc..
This is important to me, i hope that some of you may help me..
Hope to hear from you...
Cheers!
/Ulven
Reached end of medium on output.
If you want to go on, type device/file name when ready.
Anyone?
"Ulven" <fre...@REMOVESPAMulven.com> wrote in message
news:UDoA9.12679$TK2.1...@juliett.dax.net...
You've run out of room.
Insert a new tape, floppy or whatever, type its device name and press enter.
You might want to try reading "man cpio", which explains this and tells
you how you can even have it spit out a different message.
--
Please note new phone number: (781) 784-7547
Tony Lawrence
Unix/Linux Support Tips, How-To's, Tests and more: http://aplawrence.com
Free Unix/Linux Consultants list: http://aplawrence.com/consultants.html
I guess your real question was "Why have I run out of room?"
I would guess that your tape unit is not set for hardware compression.
The cpio headers add enough to run you out. Turn on compression
See http://aplawrence.com/Bofcusm/432.html
How can i run out of room on a 10GB (native) 20GB compressed tape, when i
have only 9GB harddrive installed, and it is not full....
> > Insert a new tape, floppy or whatever, type its device name and press
> > enter.
> >
> > You might want to try reading "man cpio", which explains this and tells
> > you how you can even have it spit out a different message.
>
> I guess your real question was "Why have I run out of room?"
>
> I would guess that your tape unit is not set for hardware compression.
> The cpio headers add enough to run you out. Turn on compression
>
> See http://aplawrence.com/Bofcusm/432.html
Thank, i got some tips from this link...
But, what block size should i use on tapes?
I don't find anything on Seagate's pages :-(
Your problem isn't block size, but if you searcxh for "tape" at
http://aplawrence.com/mysearch.html you'll find more than enough to
satisfy just about anything you want to know.
Really, though, you should be using a supertar:
http://aplawrence.com/Reviews/supertars.html
But, one more questions...
If a backup failes, the tape drive is been blocked until i reboot the
server..
example:
# tape status
tape: can't open '/dev/nrStp0': Device busy
There are no help in killing PID's etc..
Is there any other way of killing this session?
/Ulven
"Tony Lawrence" <to...@pcunix.com> wrote in message
news:aqtnmh$jrt$1...@pcls4.std.com...
Do you mean while it's asking you to put in the next tape??? It closes
the device before asking that, though you will have to wait for it to
rewind bfore you can use it again.
If that's not what you mean, then you have a hardware problem or this is
one of those useless cheap Travan pieces of junk I see so much of
nowadays. I guess the newer ones are a lot better than what they used
to make, but I'm still no fan. If you have one of the old ones, this
type of behavior is perfectly typical. It's junk and you should treat
it accordingly.
If not, then you have scsi configuration issues: bad cabling,
termination, whatever: see http://aplawrence.com/Unixart/scsi.html
BTW, with 9 gb or less to back up, DVDRAM is a far better backup: see
http://aplawrence.com/Reviews/dvdram.html
I guess it just an old crap.. hehe.. its a Seagate Travan NS20 (10/20GB)
We have had a lot of problems with this type on WinNT 4 and 2000 to, bad
writings etc..
But the thing here is that if i try to run a backup with my script, it
shuddenly stops and hangs.. ctrl-d/z/x/q etc dows not work.. i have to log
off, and on again.. i kill the session, and i try to kill proc. that uses
the device.. but still hangs..
But with the script i got here at news seems to work, it runs with
compression now.. i have run backup for 4-5 times and it works great.
Is there a way that i can "see" or check whats on the tape... i want to see
that the backup is realy on the tape.
Server is located in sweeden, and i'm in norway you see... :-)
Cheers!
/Ulven.
We, too, unfortunately have the Travan tape drives, and replacement
is an economic impossibility at this time.
One of the many funny problems we have had with this tape drive is that there
is a rubber belt driving a capstan. The rubber belt periodically slips
off, and the messages pertaining to this are, to be kind, ambiguous and
inconsistent. The only consistency is that the drive doesn't work without
the belt (Duh).
The rubber band comes off quite often. We have tape drive problems
on a regular basis, and before we call the hardware man we now as a
matter of routine check the rubber band, and replace it by hand if
need be.
I would not be surprised to find a full-grown squirrel cage, complete
with squirrel, inside a Travan tape drive. They will not sell us
another drive. Ever.
Good luck!
73 de Bill W5GFE
(sigh)
You really shouldn't be doing this. You should be using a supertar (
http://aplawrence.com/Reviews/supertars.html )
>How can i run out of room on a 10GB (native) 20GB compressed
>tape, when i have only 9GB harddrive installed, and it is not
>full....
Well there were many Travans. Most I recall list the compressed
capacity using DOS type programs that compressed the data before
storage. Good current SCSI devices that most Unix people use have
native hardwae compression in the tape drive.
It might have helped if you had given model number. Otherwise
it's like saying 'I need a head gasket for my Chevrolet' with
giving year/model/etc.
Bill
--
Bill Vermillion - bv @ wjv . com