1753689 Members
5088 Online
108799 Solutions
New Discussion юеВ

Re: tar file to tape

 
heaman1
Regular Advisor

tar file to tape

I have a tape which have data in it ( make by other backup tool ) , I want to use tar to append data to it , I tried "tar -cvf dev file" , it will overwrite the data in the tape , can advise how to preserve the existing data ? thx
6 REPLIES 6
Michal Kapalka (mikap)
Honored Contributor

Re: tar file to tape

hi,

this is a example for solaris but its the same for all Unix / Linux .

http://www.cyberciti.biz/faq/linux-tape-backup-with-mt-and-tar-command-howto/

http://www.cyberciti.biz/tips/solaris-tar-command-to-backup-data-on-tape-device.html

- if there is a other backup, you should use another tape.

mikap
heaman1
Regular Advisor

Re: tar file to tape

thx reply

when I use tar -rvf dev file , it pop the below error in my RH server , can advise what is wrong ? thx

tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
Michal Kapalka (mikap)
Honored Contributor

Re: tar file to tape

hi,

if you wona use tape for archiving you need to handle the tapes with mt, this small tool handle the operation with the Magnetic Tape.

http://www.cs.inf.ethz.ch/stricker/lab/linux_tape.html

mikap
Steven Schweda
Honored Contributor

Re: tar file to tape

> I have a tape which have data in it ( make
> by other backup tool ) [...]

What, exactly, is "other backup tool", and
does it write "tar" archives?

> when I use tar -rvf dev file , [...]

If the thing on the tape is not a "tar"
archive, then what do you expect from "tar
-r"?

http://www.gnu.org/software/tar/manual/html_node/Operation-Summary.html#SEC41

[...]
'--append'
'-r'

Appends files to the end of the archive. See section How to Add Files to Existing Archives:
'--append'
[...]

See the part where it says "Appends files to
the end of the archive"? It's talking about
a "tar" archive, not any old pile of bits on
a tape.

If you can get "mt" to forward-space to the
end of the data on the tape, and if you use
a non-rewinding tape device, then "tar -c"
might work.

> [...] I tried "tar -cvf dev file" [...]

As usual, showing the actual commands you
used might be more helpful than vague
descriptions and interpretations. In this
case, "dev" is particularly uninformative.
Dennis Handly
Acclaimed Contributor

Re: tar file to tape

Steven Schweda
Honored Contributor

Re: tar file to tape

> You also asked this in the HP-UX forum:

In some cases it helps to ask the same
question repeatedly until you get an answer
you like. In other cases, you just waste
everyone's time.

Hmmm. Which case is this?