LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 08-24-2005, 03:25 PM   #1
nlinecomputers
Member
 
Registered: Aug 2005
Location: Midland, TX
Distribution: Ubuntu
Posts: 125

Rep: Reputation: 15
Wierd tape problem. HELP!


I've got a client that runs a samba file server for her Winblows desktops. The system is running Suse 9.3 and uses a Seagate stt8000a for backups using a simple tar script.

I've been trying to test the backup to make sure that it work and it is failing.

Whenever I try to use tar to restore the drive IMMEDIATELY returns

/bin/tar: home/nathan: Not found in archive
/bin/tar: Error exit delayed from previous errors

Doesn't matter what file name I use the response is the same and just as fast. home should be deep on the tape so it ought to run awhile.

The backup appears to run correctly a file list is output to a file call filelist.txt

This should be pretty straight forward but it isn't. I've tested the tape drive using Certance's dos based utility and it passes. So I'm thinking this must be some kind of issue in Linux.

Any Ideas? I fearful that I've got gibberish for backup tapes.

Nathan Williams
 
Old 08-24-2005, 07:18 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"Whenever I try to use tar to restore the drive IMMEDIATELY returns

/bin/tar: home/nathan: Not found in archive
/bin/tar: Error exit delayed from previous errors"

Could you post the command that you used to make the tape and also post the command that you are trying to use to restore from the tape.

--------------------
Steve Stites
 
Old 08-24-2005, 07:55 PM   #3
nlinecomputers
Member
 
Registered: Aug 2005
Location: Midland, TX
Distribution: Ubuntu
Posts: 125

Original Poster
Rep: Reputation: 15
Sure I can. I use scripts so I'll post the whole script:
Code:
#!/bin/sh

# Backup
#
# This script backs up all server data to tape.
#
# Delete old filelists
rm /backup/filelist.txt
rm /backup/filelist.txt.gz
# Delete old mysql dumps
rm -f -r /backup/mysql
mkdir /backup/mysql

# Dump all mysql databases
#mysqldump --add-drop-table -A --user=root --password=xxxx > /backup/mysql/databases.sql

# Initialize the tape drive
    /usr/bin/mt -f "/dev/nst0" rewind > /dev/null 2>&1

# Do backup
/bin/tar --create --verbose --preserve --ignore-failed-read --file=/dev/nst0  /etc /root /boot /home /data /usr/local /var/backups /var/lib /var/log /var/www /var/spool/mail > /backup/filelist.txt

# Add completion date to filelist
echo "Backup complete on " `date` >> /backup/filelist.txt

/usr/bin/mt -f "/dev/nst0" rewind

#/bin/mt -f "/dev/nst0" eject

#Mail filelist to root so that it is forwarded to N-Line Computers
/bin/gzip /backup/filelist.txt
/usr/bin/uuencode /backup/filelist.txt.gz /backup/filelist.txt.gz |mail root -s "Backup List"
And my test restore script:
Code:
#!/bin/sh

# Restore everything
# This script restores all system files from tape.
#
# Initialize the tape drive
    /usr/bin/mt -f "/dev/nst0" rewind > /dev/null 2>&1

# Do restore
# The directory order must match the order on the tape.
#
#/bin/tar --extract --verbose --preserve --file=/dev/nst0 var etc root usr lib boot bin home sbin backup
/bin/tar --extract --verbose --preserve --file=/dev/nst0 home/nathan
# note: in many cases, these directories don't need to be restored:
# initrd opt misc tmp mnt

# Rewind tape when done
/usr/bin/mt -f "/dev/nst0" rewind
 
Old 08-24-2005, 09:33 PM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"/bin/tar --create --verbose --preserve --ignore-failed-read --file=/dev/nst0 /etc /root /boot /home /data /usr/local /var/backups /var/lib /var/log /var/www /var/spool/mail > /backup/filelist.txt"

One possible cause of the problem is that you could be using the wrong tape address. If you use the wrong tape address when you write to a tape then you get normal screen output ( /backup/filelist.txt in this case). But the actual writes to the tape go to /dev/null instead. Then when you read from the tape you have an empty tape.

"I fearful that I've got gibberish for backup tapes."

If my guess about the tape addresses is correct then all of your backup tapes are garbage.

So I would first test the backup step. Watch and listen to the tape when you create a backup. Does it actually move and make noise?

Also where is the tape physically attached? Your script is writing to a SCSI tape device. If the Seagate stt8000a is physically attached as an ATAPI device then it is probably /dev/ht0 and /dev/nht0, although I am somewhat rusty on tape addresses.

---------------------------
Steve Stites

Last edited by jailbait; 08-24-2005 at 09:35 PM.
 
Old 08-24-2005, 09:53 PM   #5
nlinecomputers
Member
 
Registered: Aug 2005
Location: Midland, TX
Distribution: Ubuntu
Posts: 125

Original Poster
Rep: Reputation: 15
The tape goes through all the motions. The tape is a ATAPI tape but you have to use ide-scsi to address it. I never got ide-tape to work ever. I've got another client with the same setup and I plan to see if he is willing to let me borrow his drive for a couple of hours. I'm starting to suspect a bad tape drive. I've got an STT20000A. bigger drive but still an ATAPI, on my personal server running the same script with no problems. I tested a restore tonight on that unit and it works. So I know the script is good.

I downloaded and tried to run flexbackup and it does the same thing. Runs a complete backup using afio. When I try to restore I get afio bad binary pathname errors. However flexbackup puts an index on the drive before you do a backup and it reads back the name correctly.

I also tried a copy of Tapeware and it too fails the backup. All do the same thing. Claim a good backup until you try and read the tapes.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
wierd cgi problem ruwach Linux - Networking 4 06-04-2005 11:39 AM
really wierd problem mrchin Linux - Newbie 6 09-01-2004 04:33 PM
wierd problem Zerodark Slackware 2 10-31-2003 08:53 PM
wierd problem jt1020 Linux - General 2 05-19-2003 02:29 PM
wierd problem! jt1020 Linux - General 1 05-07-2003 11:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration