APLawrence - Information and Resources for Unix and Linux Systems, Bloggers and the self-employed
RSS Feeds Get APLawrence.com by RSS











(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Home > News Posts > using tar basics restoring tar tape ––>Re: tape mount andfile system type?
Printer Friendly Version




News Group Posts

using tar basics restoring tar tape




From: Tony Lawrence <tony@aplawrence.com>
Newsgroups: comp.os.linux.misc
Subject: Re: tape mount and file system type?
Date: Mon, 21 Aug 2000 08:54:16 -0400

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:

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


If this page was useful to you, please click to help others find it:  

Your +1's can help friends, contacts, and others on the web find the best stuff when they search.

Comments?



Click here to add your comments



Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar



Auto FTP Manager

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

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.

g_face.jpg

This post tagged:

       - SCO_OSR5




Unix/Linux Consultants

Skills Tests

Guest Post Here