Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 39A889FB467 for ; Mon, 16 Jul 2007 19:22:20 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 06349-01 for ; Mon, 16 Jul 2007 19:22:02 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from momjian.us (momjian.us [70.90.9.53]) by postgresql.org (Postfix) with ESMTP id D5E069FB24B for ; Mon, 16 Jul 2007 19:22:15 -0300 (ADT) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id l6GMM5V23075; Mon, 16 Jul 2007 18:22:05 -0400 (EDT) From: Bruce Momjian Message-Id: <200707162222.l6GMM5V23075@momjian.us> Subject: Re: GNU tar and PITR In-Reply-To: <200707161205.10972.peter_e@gmx.net> To: Peter Eisentraut Date: Mon, 16 Jul 2007 18:22:05 -0400 (EDT) CC: pgsql-docs@postgresql.org X-Mailer: ELM [version 2.4ME+ PL123] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ELM1184624525-22050-0_" Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/7 X-Sequence-Number: 4334 --ELM1184624525-22050-0_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" Peter Eisentraut wrote: > Am Montag, 16. Juli 2007 12:01 schrieb Peter Eisentraut: > > http://developer.postgresql.org/pgdocs/postgres/continuous-archiving.html > > says: > > > > """ > > Also, some versions of GNU tar consider it an error if a file is changed > > while tar is copying it. There does not seem to be any very convenient way > > to distinguish this error from other types of errors, other than manual > > inspection of tar's messages. GNU tar is therefore not the best tool for > > making base backups. > > """ > > > > However, GNU tar returns 2 for a real error and 1 for the file changed > > case. Isn't that sufficient? > > Ah ... > > """ > version 1.16 - Sergey Poznyakoff, 2006-10-21 > > * 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. > """ > > We should update the documentation. Docs updated, patch attached. -- Bruce Momjian http://momjian.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + --ELM1184624525-22050-0_ Content-Transfer-Encoding: 7bit Content-Type: text/x-diff Content-Disposition: inline; filename="/rtmp/diff" Index: backup.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v retrieving revision 2.98 retrieving revision 2.99 diff -c -r2.98 -r2.99 *** backup.sgml 29 Jun 2007 15:46:21 -0000 2.98 --- backup.sgml 16 Jul 2007 22:20:51 -0000 2.99 *************** *** 734,746 **** complaints of this sort from real errors. For example, some versions of rsync return a separate exit code for vanished source files, and you can write a driver script to accept this exit ! code as a non-error case. Also, ! some versions of GNU tar consider it an error if a file ! is changed while tar is copying it. There does not seem ! to be any very convenient way to distinguish this error from other types ! of errors, other than manual inspection of tar's messages. ! GNU tar is therefore not the best tool for making base ! backups. --- 734,744 ---- complaints of this sort from real errors. For example, some versions of rsync return a separate exit code for vanished source files, and you can write a driver script to accept this exit ! code as a non-error case. Also, some versions of GNU ! tar consider it an error if a file is changed while ! tar is copying it. Fortunately, GNU ! tar versions 1.16 and later exit with 1 ! if files changed during the backup, and 2 for other errors. --ELM1184624525-22050-0_--