tar: write error: unexpected EOF


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting tar: write error: unexpected EOF
# 1  
Old 04-18-2007
Question 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.
# 2  
Old 04-18-2007
Lightbulb use tar cvf /dev/rmt/0c /tmp/dir1

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..
# 3  
Old 04-18-2007
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.
# 4  
Old 04-18-2007
Read the tar man page. Then is no such thing as a 'option "c" for compressing'.

Quote:
c Create. Writing begins at the beginning of the tarfile, instead of at the end.
And also notice:
Quote:
The E flag is required whenever the larger files and/or files with longer names, or whose UID/GID exceed 2097151, are to be archived, or if time granularity of microseconds is desired.
And 50GB counts as "larger".
# 5  
Old 04-19-2007
Question /dev/rmt/0c

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.
# 6  
Old 04-19-2007
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.
# 7  
Old 04-19-2007
Question How to identify whether tape drive supports inbuilt compression

Can you tell me how to identify whether the tape drive support built-in compression or not? Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. SCO

"Unexpected EOF within #IF, #ifdef or #ifndef" error when rebuilding / relinking SCO OpenServer 5

Hi, I am a new Unix Guru with very little experience but have the task of P2Ving an old HP Proliant ML370 G5 server to VMware ESX 4.1 or ESXi 5.5. System seems to boots fine but when trying to remove HP software, configure TCP/IP or a driver, I am receiving: -------- ... (7 Replies)
Discussion started by: dj_Italian
7 Replies

2. Shell Programming and Scripting

Help to resolve unexpected EOF while looking for matching `"' error

Hi, can someone kindly look into my copy script and figure out why am i getting a "unexpected EOF while looking for matching `"' error message #!/bin/ksh -x cd /home/goldenga/test/flag37 if ; then rm copied.ok cd /home/goldenga/test Upper=`ls -t|grep 'qw*'|cut -d "w" -f 2|head... (4 Replies)
Discussion started by: NDalal007
4 Replies

3. Shell Programming and Scripting

eof unexpected while looking[...]

Hello I use opensuse build service to build packages (oh surprise !) I have integrate a command in a spec whose worked and now this exit with: unexpected EOF while looking for matching `"' Command: if \.").mk ]; then ln -s $(pwd)/mozilla/security/coreconf/Linux2.6.mk \ ... (5 Replies)
Discussion started by: posophe
5 Replies

4. UNIX for Advanced & Expert Users

scp/untar in parallel issue tar : Unexpected EOF in archive

Hi Guys, I am facing a strange issue while doing parallel (using & for background) scp/untar operation from my unix box to multiple unix boxes... I am getting tar : unexpected EOF in archive error the code is as follows.,,, for i in 10 do sh -c "scp <command> ; ssh tar -xf <tar> -C... (1 Reply)
Discussion started by: mihirvora16
1 Replies

5. Shell Programming and Scripting

EOF Usage - line 56: syntax error: unexpected end of file

Below is a test script I'm writing in the process of learning to write script. When I try to run it I get an unexpected end of file error on line 56. Thoughts? SCRIPT: #!/bin/bash # system_page - A script to produce a system information HTML file ##### Constants TITLE="My System... (1 Reply)
Discussion started by: mpercy725
1 Replies

6. UNIX for Advanced & Expert Users

tar: write error: unexpected EOF

tar: write error: unexpected EOF I usually encounter this when I'm doing backup to Dat72 tape. Here's the command gzip all files in a directory then tar cvfp /dev/rmt/0n files. Not all files are copied. Any things I should look at? Directory size? ---------- Post updated at 05:20 PM... (1 Reply)
Discussion started by: lhareigh890
1 Replies

7. UNIX for Advanced & Expert Users

tar:read error: unexpected EOF

I need archive data from some tar files. I use the command "tar xvf filename". For about half of the files I get the error message "tar:read error: unexpected EOF". The number of bytes extracted comes very close to the size of the tar file. An example: 972434779 Jan 10 01:01... (4 Replies)
Discussion started by: mikeruth
4 Replies

8. Shell Programming and Scripting

Unexpected eof error

Hi, I am newbie and am just trying to connect to oracle from shell script ,,,but I am getting the following error ./prog.sh: line 20: syntax error: unexpected end of file The scripts is : #!/bin/bash O=$IFS; IFS=","; while read a b c d do echo $c ... (6 Replies)
Discussion started by: thana
6 Replies

9. UNIX for Dummies Questions & Answers

tar: write error: unexpected EOF

I am taring to disk and get this message: tar: write error: unexpected EOF This message is normally associated with tape devices, not disk. Here is the syntax: tar -cf <tarfilename> /dir Have you seen this message on disk tars? (4 Replies)
Discussion started by: jabe
4 Replies

10. UNIX for Dummies Questions & Answers

tar: write error unexpected end of file

Hi, I have attempted to backup some database files on my company's Solaris machine about 3 times now. Each time that I attempt the backup, about 6 files are evident on the dat tape when I do read of the media and then I see the dreaded "tar: write error unexpected EOF" message. Each time that I... (2 Replies)
Discussion started by: robyn
2 Replies
Login or Register to Ask a Question