Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id D37662E30D2 for ; Wed, 16 Jan 2008 06:30:48 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 36811-08 for ; Wed, 16 Jan 2008 06:30:36 -0400 (AST) Received: from server.firetrust.net (mailserver.firetrust.com [209.213.221.13]) by postgresql.org (Postfix) with ESMTP id 7579E2E2D36 for ; Wed, 16 Jan 2008 06:30:41 -0400 (AST) Received: from xpc (203-173-130-188.dsl.dyn.ihug.co.nz [203.173.130.188] (may be forged)) (authenticated bits=0) by server.firetrust.net (8.14.2/8.14.2) with ESMTP id m0GAUYbp014273 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 16 Jan 2008 23:30:37 +1300 Date: Wed, 16 Jan 2008 23:30:30 +1300 From: Steve Holdoway To: pgsql-admin@postgresql.org Subject: Re: Backup of live database Message-Id: <20080116233030.c1adbcb1.steve.holdoway@firetrust.com> In-Reply-To: <5a9699850801160024y7abdcd2fjdb1035c2070797eb@mail.gmail.com> References: <5a9699850801152257g6ee9513i6c4fc88a5f20a785@mail.gmail.com> <478DAC1D.3010909@commandprompt.com> <5a9699850801152310g39fa9bf3y3926892145ab3dcf@mail.gmail.com> <478DBAC3.8050802@commandprompt.com> <5a9699850801160024y7abdcd2fjdb1035c2070797eb@mail.gmail.com> Organization: Firetrust Ltd. X-Mailer: Sylpheed 2.4.5 (GTK+ 2.12.0; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MailWasher-Server-Scanned: Checked by MailWasher server v2.2.3 (www.Firetrust.com) X-MailWasher-Server-Status: Clean X-Virus-Scanned: ClamAV 0.92/5484/Wed Jan 16 08:31:27 2008 on server.firetrust.net X-Virus-Status: Clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/180 X-Sequence-Number: 27954 You can be absolutely certain that the tar backup of a file that's changed is a complete waste of time. Because it changed while you were copying it. Steve. On Wed, 16 Jan 2008 10:24:00 +0200 "Brian Modra" wrote: > Sorry to be hammering this point, but I want to be totally sure its OK, > rather than 5 months down the line attempt to recover, and it fails... > > Are you absolutely certain that the tar backup of the file that changed, is > OK? (And that even if that file is huge, tar has managed to save the file as > it was before it was changed - otherwise I'm afraid that the first part of > the file is saved to tar, and then the file is modified, and the last part > of the file is saved to tar from the point it was modified - and so > therefore not consistent with the first part... And therefore the file has > lost its integrity, so even a WAL restore won't help because the base files > themselves are corrupt in the tar file? > > On 16/01/2008, Joshua D. Drake wrote: > > > > Brian Modra wrote: > > > The documentation about WAL says that you can start a live backup, as > > > long as you use WAL backup also. > > > I'm concerned about the integrity of the tar file. Can someone help me > > > with that? > > > > If you are using point in time recovery: > > > > http://www.postgresql.org/docs/8.2/static/continuous-archiving.html > > > > You do not have to worry about it. > > > > Joshua D. Drake > > > > > > > > > > > > > > > > > > On 16/01/2008, *Joshua D. Drake* > > > wrote: > > > > > > Brian Modra wrote: > > > > Hi, > > > > If tar reports that a file was modified while it was being > > archived, > > > > does that mean that the file was archived correctly, or is it > > > corrupted > > > > in the archive? > > > > Does tar take a snapshot of the file so that even if it is > > > modified, at > > > > least the archive is safe? > > > > > > You can not use tar to backup postgresql if it is running. > > > > > > http://www.postgresql.org/docs/8.2/static/backup.html > > > > > > > > > Sincerely, > > > > > > Joshua D. Drake > > > > > > > Thanks > > > > > > > > -- > > > > Brian Modra Land line: +27 23 5411 462 > > > > Mobile: +27 79 183 8059 > > > > 6 Jan Louw Str, Prince Albert, 6930 > > > > Postal: P.O. Box 2, Prince Albert 6930 > > > > South Africa > > > > > > > > > > > > > > > -- > > > Brian Modra Land line: +27 23 5411 462 > > > Mobile: +27 79 183 8059 > > > 6 Jan Louw Str, Prince Albert, 6930 > > > Postal: P.O. Box 2, Prince Albert 6930 > > > South Africa > > > > > > > -- > Brian Modra Land line: +27 23 5411 462 > Mobile: +27 79 183 8059 > 6 Jan Louw Str, Prince Albert, 6930 > Postal: P.O. Box 2, Prince Albert 6930 > South Africa > -- Steve Holdoway