Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 846F19FA19E for ; Fri, 19 Oct 2007 11:57:21 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 16182-01 for ; Fri, 19 Oct 2007 11:57:18 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from gwmta.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by postgresql.org (Postfix) with ESMTP id 034EF9FA5A3 for ; Fri, 19 Oct 2007 11:57:17 -0300 (ADT) Received: from Courts-MTA by gwmta.wicourts.gov with Novell_GroupWise; Fri, 19 Oct 2007 09:57:16 -0500 Message-Id: <47187F73.EE98.0025.0@wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 7.0.2 Date: Fri, 19 Oct 2007 09:57:07 -0500 From: "Kevin Grittner" To: "Mikko Partio" , Subject: Re: Continuous archiving and wal generation References: <2ca799770710182340y9877687i8e82cd6847f37c5a@mail.gmail.com> In-Reply-To: <2ca799770710182340y9877687i8e82cd6847f37c5a@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/192 X-Sequence-Number: 27106 >>> On Fri, Oct 19, 2007 at 1:40 AM, in message <2ca799770710182340y9877687i8e82cd6847f37c5a@mail.gmail.com>, "Mikko = Partio" wrote:=20 >=20 > To make use of the backup, you will need to keep around all the WAL = segment > files generated during and after the file system backup. To aid you in = doing > this, the pg_stop_backup function creates a *backup history file* that = is > immediately stored into the WAL archive area. This file is named after = the > first WAL segment file that you need to have to make use of the backup. = For > example, if the starting WAL file is 0000000100001234000055CD the backup > history file will be named something like > 0000000100001234000055CD.007C9330.backup. >=20 > My question is: if I have a large database which takes some time to = backup > with tar, and during the interval between pg_start_backup() and > pg_stop_backup() more than one wal file gets generated, do I have to = store > in addition to the base backup all wal files generated during the backup > interval or just the one specified by the .backup file? >=20 > I'm trying to figure out the minimum required to restore from a backup =20 If you look inside that backup file, you'll see something like this: =20 START WAL LOCATION: 47/11B7E980 (file 000000010000004700000011) STOP WAL LOCATION: 47/13006410 (file 000000010000004700000013) CHECKPOINT LOCATION: 47/11B7E980 START TIME: 2007-10-12 19:00:02 CDT LABEL: 2007-10-12_190002 STOP TIME: 2007-10-12 20:10:30 CDT =20 It tells you what files you need, as a minimum, to restore. =20 -Kevin =20