book graphic unix and linux troubleshooting guide

My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!







using tar basics restoring tar tape


What is this stuff?

If this isn't exactly what you wanted, please try our Search (there's a LOT of techy and non-techy stuff here about Linux, Unix, Mac OS X and just computers in general!):



From - Wed Aug 23 19:35:34 2000
Path: news.randori.com!not-for-mail Message-ID: <39A12678.A7173EDE@aplawrence.com>
From: Tony Lawrence <tony@aplawrence.com>
Organization: A.P. Lawrence
MIME-Version: 1.0
Newsgroups: comp.os.linux.misc
Subject: Re: tape mount and file system type? References: <399DD98E.8D978034@rcn.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 87
Date: Mon, 21 Aug 2000 08:54:16 -0400
Xref: news.randori.com comp.os.linux.misc:224381
X-Mozilla-Status: 0000
X-Mozilla-Status2: 00000000


Hate these ads?



teverett wrote:

> hey all,
>                 can anyone tell me how to mount a dat tape with a unix
> media and recover a tar file from it?  im currently using Redhat 6.1.
> ive tried every option in the "man mount" files,  but when i try to
> mount the tape the return always tells me to specify the filesystem
> type.  does anyone have any experience in this?  thanks in advance for
> any help!!!   :)



You don't mount a tar tape.














To succesfully restore a file, you first want to know how
the archive was created: relative or absolute.  To do this,
run



tar tvf /dev/whateveryourtapenodeis | head



You'll get back either:


ad



file1
file2
..



or



./file1
./file2
..









or



/file1
/file2
..



or even



//file1
//file2
..




The first two are relative forms, and if you restored either
the entire archive 



tar xvf /dev/nameofyourtapenode



or a particular file



tar xvf /dev/nameofyourtapenode file2



The files would end up in your current directory, which may
not be whereyou want them.



With some tars you have to be specific, and need to match
exactly how it was stored:
tar xvf /dev/nameofyourtapenode ./file2 



Conversely, if the archive was created with absolute paths,
a restore of



tar xvf /dev/nameofyourtapenode 



will put everything back where it originally was, which
again may not be what you want: there is a flag 



tar xAvf /dev/nameofyourtapenode 



that will suppress the leading "/"'s and let you restore
relative to your current directory.




And again, some tars require explicit naming: if it was
saved as //home/james/file , you need to say



tar xvf /dev/nameofyourtapenode //home/james/file



and if it was saved as /home/james/file , you need to say



tar xvf /dev/nameofyourtapenode /home/james/file




-- 
Tony Lawrence (tony@aplawrence.com)
Linux articles, help, book reviews, tests, 
job listings and more : /Linux









Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)

Or use any RSS reader

Delivered by FeedBurner

cartoon
Need eyes on the ground at your customer's site?
Installation and light training Boston and New England
Reliable and experienced, punctual and professional.


Views for this page
Today This Week This Month This Year  Overall
2222727 4,793

/Bofcusm/516.html copyright 1997-2004 (various authors) All Rights Reserved

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

More:
       - Newsgroup
       - Tape Drives




Unix/Linux Consultants


SCO, OpenServer, UnixWare, software, servers, security, networks, installation, administration, troubleshooting, maintenance, Watchguard, firewalls, VPNs, e-mail. Visit us at Open Systems Computing and www.go2unix.com.


http://www.schewanick.com SCO Unix, Solaris, Linx (various), PHP, MySQL, Apache, uniBasic, dL4, Perl, System Administration and more....


larryi@ccamedical.com SCO OS5, Debian Linux, RedHat Linux, MySQL, Apache, AJAX development using dXport/dL4/Unibasic, Windows Connectivity, Sharing Resouces, Automation, Shell Scripting



Twitter
o I just woke up Pretty Girl and told her I'm taking her for a Birthday Breakfast. 6:31 AM Nov 10th 2008




card_image







Change Congress