LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-26-2003, 01:27 PM   #1
WorldBuilder
Member
 
Registered: Mar 2003
Location: Massachusetts, USA
Distribution: RH 8, Solaris, Windoze eXPunged
Posts: 520

Rep: Reputation: 30
Tape backup troubles... Argh


Hi all,

I had a previous thread on this matter (which can be read HERE ) if you want to see what led up to this new post.

I have now made a successful backup of /home/chris/My_Documents/Downloads as well as all the files in the "Downloads" directory. In total (including the Downloads directory itself), there are 29 items on the tape that I verified with a "tar tv /dev/st0" command. I have now deleted the Downloads directory and all of its contents and would like to try to restore from tape to verify that I can restore. How would I do this? Would the tar command be tar tvf /dev/st0 /home/chris/My_Documents? Would that create the replace the Downloads directory and all of its contents back under the My_Documents directory? Please let me know.

The reason (as you will see if you connected to the URL above to my previous thread) I tried to backup just this small directory is to see if the drive and tape were functioning at all. When I try to backup the entire system with "tar cf /dev/st0 /", the tape drive spins up for 3.5 hours, then finishes and reports the following error:
tar: /dev/st0: Wrote only 0 of 10240 Bytes
tar: Error is not recoverable: exiting now

I do not know why this is happening, because as you just read, the backup of a directory seems to be working, so I don't believe it's the tape or drive itself. The drive is a SUN DLT 4000 external SCSI drive and is hooked up through an Adaptec 2940 SCSI card. The entire system (Red Hat 8.0 Pro) is using about 30GB of a 120GB HDD. The tape drive has a capacity of 20/40GB. Anythoughts on why I am getting this error when trying to backup the entire system? I'd appreciate any help! Thanks in advance!

Chris
 
Old 04-26-2003, 03:14 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,353

Rep: Reputation: 553Reputation: 553Reputation: 553Reputation: 553Reputation: 553Reputation: 553
Tar restores

The tar restore command should be the same as the backup command you used except substitute an x for the c in the backup command. So if you backed up with tar cvf /dev/st0 /home/chris/My_Documents then the restore command would be tar xvf /dev/st0 /home/chris/My_Documents.

Your tape problems sure look to me like you are using an unformated tape.
If that is not the problem then the backup may be failing when the tape is full and tar tries to write the next block.

I would break this backup into several smaller ones, both to get it working and also to make recovery a whole lot easier.
 
Old 04-26-2003, 03:52 PM   #3
pablob
Member
 
Registered: Apr 2003
Location: Madrid
Distribution: RHEL, Kubuntu, Solaris, TRU64
Posts: 382

Rep: Reputation: 31
Or try using 'dump' and 'restore'. It's very easy to use.
 
Old 04-27-2003, 10:07 AM   #4
WorldBuilder
Member
 
Registered: Mar 2003
Location: Massachusetts, USA
Distribution: RH 8, Solaris, Windoze eXPunged
Posts: 520

Original Poster
Rep: Reputation: 30
Hi jailbait,

Ok, I'm still having some restore issues. I did a "tar tvf /dev/st0" and with that, I can see the Downloads directory and all of its contents on the tape. I have attempted to use the following commands to restore:

tar xvf /dev/st0 /home/chris/My_Documents
tar xvf /dev/st0 /home/chris/My_Documents/
tar xvf /dev/st0 /home/chris/My_Documents/Downloads
tar xvf /dev/st0 /home/chris/My_Documents/Downloads/

Each time, I am getting the same error after the tape spins for a few minutes. I am getting "tar: /home/chris/My_Documents/Downloads: Not found in archive"
tar: Error exit delayed from previous errors

Of course, the error is different everytime as far as the path is concerned, but the message is the same. Like I said, this was a test run to get the backup to work at all and these files aren't important (I have them on another machine anyway), but I want to get this working and understand it. Any other thoughts? Thanks!

Chris

PS. These tapes should be formatted, but how do I check it, and how do I format them if they are not already? If they are not formatted, how would the backup of this one directory (Downloads) have worked (which it apparentley did)? They must be formatted, right?
 
Old 04-27-2003, 12:45 PM   #5
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,353

Rep: Reputation: 553Reputation: 553Reputation: 553Reputation: 553Reputation: 553Reputation: 553
My advice is counter productive.

Your tape is a SUN DLT 4000 external SCSI drive and is hooked up through an Adaptec 2940 SCSI card and my tape is an iomega QIC-80 hooked up through the floppy controller. I still have my tape drive installed but I have not used it for over a year.

I did a google search and found some information on your Sun DLT 4000. There are some significant differences between the way your tape drive works and the way my old tape drive used to work. On my old tape drive all of your problems could be accounted for by using an unformatted tape. The web site that I found says that you do not need to format a Sun DLT 4000 which is what you have said in two of your posts already. So I am giving you a link to a description of how to get your drive working and I will bow out of trying to tell you my way of doing it because obviously there are significant differences between the way my tape works and the way yours works.

http://www-oss.fnal.gov/projects/fer.../faq/0019.html
 
Old 04-28-2003, 07:29 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,129

Rep: Reputation: 6076Reputation: 6076Reputation: 6076Reputation: 6076Reputation: 6076Reputation: 6076Reputation: 6076Reputation: 6076Reputation: 6076Reputation: 6076Reputation: 6076
Quote:
Originally posted by cjwsb


tar xvf /dev/st0 /home/chris/My_Documents
tar xvf /dev/st0 /home/chris/My_Documents/
tar xvf /dev/st0 /home/chris/My_Documents/Downloads
tar xvf /dev/st0 /home/chris/My_Documents/Downloads/

Looks like you are trying to restore the file name My_Documents or Downloads and not the directory. I suggest testing in a tmp directory or on another partition to keep from screwing anything up.

Look at the output of the tvf and see how the path was saved. then cd to the top of the path and restore.

cd /path_from_above (if not already there)
tar xvf /dev/st0

You can also practice with a file instead of using the tape drive. Does the same thing but only faster. There is an option for saving absolute paths. See tar man pages for details.
 
Old 03-19-2004, 11:40 PM   #7
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,837

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Re: Tape backup troubles... Argh

Quote:
When I try to backup the entire system with "tar cf /dev/st0 /", the tape drive spins up for 3.5 hours, then finishes and reports the following error:
tar: /dev/st0: Wrote only 0 of 10240 Bytes
tar: Error is not recoverable: exiting now
Running for 3-1/2 hours and crapping out seems a bit odd. I'm backing up an entire system in under two hours.

Have you looked at the man page for "stinit"? I have an older DLT drive that I'm running on a Red Hat system and I invoke a shell script to run stinit within rc.sysinit after the st device has been detected and insmod loads the st module. I have no problems writing or reading. When you set up the config file that you supply to stinit, I've found that setting the blocksize=0 (which indicates that you want variable sized blocks as I recall) works well.

--
RT
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tape backup triley Linux - General 2 08-31-2005 11:14 AM
Tape drive that used to work... argh! budzynm Linux - Hardware 1 02-22-2004 06:36 PM
Tape incremental backup to different tape tungaw2001 Linux - Software 0 08-13-2003 09:42 PM
Tape Backup Falieson Linux - Hardware 4 06-12-2003 08:07 PM
tape backup joel112 Linux - Software 1 06-04-2003 01:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:24 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