bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] --ignore-failed-read not applied to files changing as tar


From: Sergey Poznyakoff
Subject: Re: [Bug-tar] --ignore-failed-read not applied to files changing as tar reads them
Date: Tue, 27 Mar 2007 17:30:11 +0300

Trond Endrestøl <address@hidden> wrote:

> In previous versions GNU tar did not exit with 1 or 2 when "a 'file 
> changed as we read' it". This new behaviour causes AMANDA to make a 
> second attempt to backup a particular filesystem, thus wasting 
> both bandwidth and time.

Yes, this is due to the following change in 1.16:

   * After creating an archive, tar exits with code 1 if some files were
     changed while being read.  Previous versions exited with code 2 (fatal
     error), and only if some files were truncated while being archived.

So, for your purpose you can treat the exit code 1 as a successful
return: it is returned only if some files were changed while
archiving, any actual error causes tar to return code 2.
 
> In my case this is not a serious error, since this happens quite a lot 
> with log files held open by syslogd. I'd rather have GNU tar exit with 
> 0 as before, though only if --ignore-failed-read has been specified on 
> the command line.

It seems reasonable. However, --ignore-failed-read is meant for actual
I/O errors, so I believe some other option should be used for the
purpose.

Regards,
Sergey




reply via email to

[Prev in Thread] Current Thread [Next in Thread]