Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

tape mount and file system type?

0 views
Skip to first unread message

teverett

unread,
Aug 18, 2000, 3:00:00 AM8/18/00
to
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!!! :)


Dances With Crows

unread,
Aug 18, 2000, 9:43:42 PM8/18/00
to

Tapes don't usually have filesystems on them. When you write a tar file
to tape, you usually do so by entering "tar czf /dev/st0
/path/to/stuff", which tars up everything in /path/to/stuff and writes
it to the first rewinding SCSI tape drive. To extract an archive made
this way, you would do "tar xzf /dev/st0". If this is an IDE tape
drive, you would use /dev/ht0 instead.

You can also write multiple archives to one tape using the non-rewinding
tape devices /dev/nst0 and /dev/nht0. You can use "mt" to skip between
archives.

If I were you, I'd do "info tar" and "man mt" or check out a good book
on Unix basics, since knowing how to keep and restore good backups is
useful and important.

--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin / Those who do not understand Unix are
http://www.brainbench.com / condemned to reinvent it, poorly.
-----------------------------/ --Henry Spencer

Tony Lawrence

unread,
Aug 21, 2000, 3:00:00 AM8/21/00
to
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 (to...@aplawrence.com)
Linux articles, help, book reviews, tests,
job listings and more : http://www.pcunix.com/Linux

0 new messages