tar: write error: unexpected EOF

Hi friends,

I am using Sun Solaris 5.9. I want to take backup of 3 folders which are 50 GB in size totally using tar command on tapes. I am having DAT 72 tape. After initiating tar command (tar -cvf /dev/rmt/0n /tmp/dir1/ /tmp/dir2/ /tmp/dir3/), tarring is stopped after 10 hrs (approx) and i am getting an error like
"tar: write error: unexpected EOF".

Can anyone help me on this. Thanks in adv.

br///
Vijay.

I found one option "c" for compressing.. the command is tar cvf /dev/rmt/0c /tmp/dir1

but even though it is not compressing. any one can help .. pls .. urgent..

Ok, I have no way to test this, but I would try something like this:

tar -vf - /tmp/dir1/ /tmp/dir2/ /tmp/dir3/ | gzip -c | tar -vf /dev/rmt/0n -

I am trying to tar the directories to stdout | then compress (hope you have gzip) | and then try tar'ing the resulting gzip file.

I cannot believe a utility like tar having compression will be as good as gzip's.

If you get really desparate, you could change to gzip -c9 to do a tighter compression, at the expense of time.

Read the tar man page. Then is no such thing as a 'option "c" for compressing'.

And also notice:

And 50GB counts as "larger".

Hi,

Thanks for your valuable reply.

I am sorry, previously i didn't mentioned clearly. By using this tape options /dev/rmt/0c , it is mentioned that files can be compressed (c option). but it is not working. I found in a website.

Oh. That c in the device name of the tape drive requests hardware compression. Some tape drives have compession built-in and this is how you use it. But most tape drives do not have this type of comression.

Can you tell me how to identify whether the tape drive support built-in compression or not? :slight_smile:

Read the documentation for the tape drive in question.