[TriLUG] Strange tar problem

Scott Chilcote scottchilcote at earthlink.net
Wed Oct 12 17:47:33 EDT 2005


Glenn Hennessee wrote:
> I ran into a strange problem with tar that I did finally fix but exactly 
> what was the problem is still unknown to me.
> 
> I was using tar to backup up to tape a user's home directory. There is 
> approximately 850MB in the directory including a few files with names 
> that are using non-ascii characters. The backup would go and at the end 
> I would get an error message of "tar: Error exit delayed from previous 
> errors". No indication of what the problem was. After talking to a 
> friend he and I tried various things to try and track down the problem. 
> There were no symlinks in the users folder. We could successfully tar 
> the directory to /dev/null and to a file on the system but not to 
> /dev/st0. I was able to tar everything else I tried to the tape though. 
> Finally in desperation I copied his entire directory to /tmp with the 
> idea of deleting out files/folders until I found the file with the 
> problem BUT before deleting anything I ran tar to the tape and it worked 
> without any errors. So what I did was copy the folder to /tmp, rename 
> the original, copy back from /tmp and chown the folder to the user. I'll 
> delete the renamed, orignal folder later.
> 
> Does anyone have any idea what was going on that would prevent tar to 
> tape from working but not /dev/null or a tar file that would be fixed in 
> a copy operation?
> 
> glenn

I have found that when I get the tar error message:
 > tar: Error exit delayed from previous errors
it always follows a more descriptive error message that has been lost 
somewhere in the verbose output of the tar operation.

Tar queues several files in advance while copying, so it does not stop 
immediately when it encounters an error.  For me it is usually a 
read/write permissions problem, or occasionally a problem with the media.

If you redirect stderr to a temporary file and examine it after the 
error occurs, you will most likely find the specific error message that 
lead to the problem hidden in there.  You may have to read several pages 
up from the end of the listing to find the error.

Hope this helps...

--
Scott C.




More information about the TriLUG mailing list