- restore from tape
- Posted by Evgeniy Petrov on July 7th, 2004
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?.
- Posted by Evgeniy Petrov on July 7th, 2004
- Posted by K7MEM on July 7th, 2004
Evgeniy Petrov wrote:
This is correct for creating a tape.
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.
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
- Posted by Scott McMillan on July 7th, 2004
On Wed, 7 Jul 2004 13:39:03 +0400, "Evgeniy Petrov"
<evg@mail.wurth.ru> wrote:
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
- Posted by Doug Freyburger on July 7th, 2004
Evgeniy Petrov wrote:
Generally you should use /dev/rst0.
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.
It is correct and it does mean the tape is empty.
First goal - A tape that is not blank. Locate "myfile" carefully
or spell it correctly.
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.