Unix administration - restore from tape

This is Interesting: Free IT Magazines  
Home > Archive > Unix administration > July 2004 > restore from tape





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author restore from tape
Evgeniy Petrov

2004-07-09, 11:56 am

I have a strimer /dev/st0 (Linux Suse 8.0)

I write to strimer using command
tar cfv /dev/st0 myfile
How can I read tape (only read)
If I write
tar tf /dev/st0
nothing happend. Is it correct syntax? Does it meen that tape is empty?

How can I restore files from tape to another location (not original)?
Should I use command mt before read from tape (or write) and what is correct
syntax?
Should I do anything with new tape before using it in my strimer?.


Evgeniy Petrov

2004-07-09, 11:56 am

> I write to strimer using command
> tar cfv /dev/st0 myfile

And is strimer understand that he should clear tape and start new session?



K7MEM

2004-07-09, 11:56 am

Evgeniy Petrov wrote:
> I have a strimer /dev/st0 (Linux Suse 8.0)
>
> I write to strimer using command
> tar cfv /dev/st0 myfile


This is correct for creating a tape.

> How can I read tape (only read)
> If I write
> tar tf /dev/st0
> nothing happend. Is it correct syntax? Does it meen that tape is empty?


However, this command is only for obtaining a table of contents
from the tape. You are missing the "v", or "verbose" option so you
probably don't see anything on the screen.

>
> How can I restore files from tape to another location (not original)?
> Should I use command mt before read from tape (or write) and what is correct
> syntax?
> Should I do anything with new tape before using it in my strimer?.
>


When you initially created the tape you probably used:

cd [some directory]
tar cfv /dev/st0 myfile

Note that if "myfile" was replaced with "mydirectory", "tar" would
transfer the directory and it's contents to tape.

To obtain a a table of contents from the tape you could use:

tar -tvf /dev/st0

Then to restore your file to another directory you could use:

cd [some other directory]
tar -xvf /dev/st0

You need to carefully read the man page. It gives you some examples
that could be useful.

--
Martin E. Meserve
k7mem@myrealbox.com
http://www.k7mem.150m.com

Scott McMillan

2004-07-09, 11:56 am

On Wed, 7 Jul 2004 13:39:03 +0400, "Evgeniy Petrov"
<evg@mail.wurth.ru> wrote:

>I have a strimer /dev/st0 (Linux Suse 8.0)
>
>I write to strimer using command
>tar cfv /dev/st0 myfile
>How can I read tape (only read)
>If I write
> tar tf /dev/st0
>nothing happend. Is it correct syntax? Does it meen that tape is empty?
>
>How can I restore files from tape to another location (not original)?
>Should I use command mt before read from tape (or write) and what is correct
>syntax?
>Should I do anything with new tape before using it in my strimer?.
>


Add the v option, as in
tar tvf /dev/st0

to have tar show you the file(s) on the tape. man tar for *many* more
options.


Scott McMillan
Doug Freyburger

2004-07-09, 11:56 am

Evgeniy Petrov wrote:
>
> I have a strimer /dev/st0 (Linux Suse 8.0)


Generally you should use /dev/rst0.

> I write to strimer using command
> tar cfv /dev/st0 myfile


What is the output from that command? If "myfile" is not in
the current directory, the command will write an empty file
on the tape.

> How can I read tape (only read)
> If I write
> tar tf /dev/st0
> nothing happend. Is it correct syntax? Does it meen that tape is empty?


It is correct and it does mean the tape is empty.

> How can I restore files from tape to another location (not original)?


First goal - A tape that is not blank. Locate "myfile" carefully
or spell it correctly.

> Should I use command mt before read from tape (or write) and what is correct
> syntax?


I prefer to do "mt -f /dev/rst0 rewind ; sleep 1" before each tar,
but that assumes that the definitions of /dev/rst0 and /dev/nrst0
have been combined so the automatic rewind function has been broken.
I'm paranoid that way.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com