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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
04-26-2003, 01:27 PM
|
#1
|
Member
Registered: Mar 2003
Location: Massachusetts, USA
Distribution: RH 8, Solaris, Windoze eXPunged
Posts: 520
Rep:
|
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
|
|
|
04-26-2003, 03:14 PM
|
#2
|
LQ Guru
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,353
|
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.
|
|
|
04-26-2003, 03:52 PM
|
#3
|
Member
Registered: Apr 2003
Location: Madrid
Distribution: RHEL, Kubuntu, Solaris, TRU64
Posts: 382
Rep:
|
Or try using 'dump' and 'restore'. It's very easy to use.
|
|
|
04-27-2003, 10:07 AM
|
#4
|
Member
Registered: Mar 2003
Location: Massachusetts, USA
Distribution: RH 8, Solaris, Windoze eXPunged
Posts: 520
Original Poster
Rep:
|
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?
|
|
|
04-27-2003, 12:45 PM
|
#5
|
LQ Guru
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,353
|
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
|
|
|
04-28-2003, 07:29 AM
|
#6
|
Moderator
Registered: Aug 2002
Posts: 26,129
|
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.
|
|
|
03-19-2004, 11:40 PM
|
#7
|
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
|
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
|
|
|
All times are GMT -5. The time now is 07:24 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|