Skip site navigation (1) Skip section navigation (2)

Re: tar, but not gnu tar

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: bruce(at)momjian(dot)us
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-admin(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Tena Sakai <tsakai(at)gallo(dot)ucsf(dot)edu>, Kenneth Marshall <ktm(at)rice(dot)edu>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Subject: Re: tar, but not gnu tar
Date: 2007-09-14 13:31:29
Message-ID: 200709141331.l8EDVTY25187@momjian.us (view raw or flat)
Thread:
Lists: pgsql-admin
bruce wrote:
> > > ISTR that the original caution was against writing scripts that assume
> > > anything being emitted to stderr must indicate a problem.
> > 
> > The relevant NEWS entry from GNU tar 1.16 is:
> > 
> > """
> > * 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.
> 
> Docs updated and backpatched to 8.2.X:
> 
>     Also, some versions of GNU <application>tar</> consider it an error
>     if a file was truncated while <application>tar</> is copying it.
>     Fortunately, GNU <application>tar</> versions 1.16 and later exits
>     with <literal>1</> if a file was changed during the backup, and
>     <literal>2</> for other errors.

I have updated the documentation to mention that the real problem is an
"indistinguishable" error return code:

    Also, some versions of GNU <application>tar</> return an error code
    indistinguishable from a fatal error if a file was truncated while
    <application>tar</> was copying it.  Fortunately, GNU
    <application>tar</> versions 1.16 and later exits with <literal>1</>
    if a file was changed during the backup, and <literal>2</> for other
    errors.

-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>          http://momjian.us
  EnterpriseDB                               http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

pgsql-admin by date

Next:From: nus4uDate: 2007-09-14 18:38:00
Subject: Re: socket file missing
Previous:From: Scott MarloweDate: 2007-09-14 13:16:53
Subject: Re: socket file missing

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group