Received: from localhost (uranus.hub.org [200.46.204.60]) by postgresql.org (Postfix) with ESMTP id 26A1A9FB24B for ; Thu, 9 Nov 2006 05:52:01 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.60]) (amavisd-new, port 10024) with ESMTP id 09581-02 for ; Thu, 9 Nov 2006 05:51:57 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from perth.mailnetwork.co.uk (perth.mailnetwork.co.uk [80.175.28.46]) by postgresql.org (Postfix) with ESMTP id 02C589FB219 for ; Thu, 9 Nov 2006 05:51:57 -0400 (AST) Received: from [213.146.143.243] (port=15771 helo=[172.16.208.165]) by perth.mailnetwork.co.uk with esmtpa (Exim 4.63) (envelope-from ) id 1Gi6Ze-0005tn-UF; Thu, 09 Nov 2006 09:51:55 +0000 Message-ID: <4552FAB5.6010008@mailnetwork.co.uk> Date: Thu, 09 Nov 2006 09:53:57 +0000 From: "Andy Shellam (Mailing Lists)" User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: "Jim C. Nasby" CC: pgsql-admin@postgresql.org Subject: Re: Checkpoint Location Format References: <45508655.4040708@mailnetwork.co.uk> <20061109070209.GE90133@nasby.net> In-Reply-To: <20061109070209.GE90133@nasby.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/90 X-Sequence-Number: 23617 Hi Jim, Tom did answer actually! (Although it was first thing in the morning and he hadn't had any caffeine so he may have forgot to copy the list in ;) ) I forget what he said the format was now, and I haven't got his e-mail, but I've just done a regex to match one or more characters before and after the "/", which works. Andy. Jim C. Nasby wrote: > On Tue, Nov 07, 2006 at 01:12:53PM +0000, Andy Shellam (Mailing Lists) wrote: > >> Hi, >> >> I'm writing an automated file-system level backup application for use >> with WAL archiving, that will issue the pg_start_backup call, tar and >> gzip the cluster data directory, issue the pg_stop_backup call, and >> remove all previous un-needed WAL files from the archive. >> >> I need to write a regular expression that will search for the WAL >> filename and checkpoint location from the backup_label file, and just >> want to clarify that the checkpoint location will always be of the >> format: X/XXXXXX - where X is one of 0-9, A-F? >> >> And then the WAL .backup file that is generated in the archive, has a >> filename of the form: >> >> .00XXXXXX.backup >> >> where is the name of the "STARTING WAL LOCATION" directive in >> the backup_label file, and XXXXXX is the last 6 digits of the checkpoint >> (after the / )? >> > > I don't know the answer, but since no one's replied I suggest looking in > the code. Looking at the source of pg_start_backup would probably be a > good start, though I'm guessing the real answer is somewhere in the > backend. >