Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B44884758C9 for ; Fri, 15 Nov 2002 21:10:38 -0500 (EST) Received: from stine.vestdata.no (stine.vestdata.no [195.204.68.10]) by postgresql.org (Postfix) with ESMTP id DD15047580B for ; Fri, 15 Nov 2002 21:10:36 -0500 (EST) Received: (from ragnark@localhost) by stine.vestdata.no (8.11.6/8.11.2) id gAG2AWW13978; Sat, 16 Nov 2002 03:10:32 +0100 Date: Sat, 16 Nov 2002 03:10:32 +0100 From: =?iso-8859-1?Q?Ragnar_Kj=F8rstad?= To: linux-lvm@sistina.com Cc: Postgres Admin List , "Linux-Xfs (E-mail)" Subject: Re: [linux-lvm] PostgreSQL and file system level backup Message-ID: <20021116031032.V17827@vestdata.no> References: <2D92FEBFD3BE1346A6C397223A8DD3FC09208C@THOR.goeci.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5.1i In-Reply-To: <2D92FEBFD3BE1346A6C397223A8DD3FC09208C@THOR.goeci.com>; from murthy.kambhampaty@goeci.com on Fri, Nov 15, 2002 at 04:25:49PM -0500 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/171 X-Sequence-Number: 6359 On Fri, Nov 15, 2002 at 04:25:49PM -0500, Murthy Kambhampaty wrote: > "Unless the postmaster is shut down meanwhile, you'll probably end up with a > corrupt database. The problem is that xfsdump does not give you an > instantaneous snapshot of the filesystem state, so you will probably collect > inconsistent contents of the various files that make up the database." > > Which gives rise to my present question: given that LVM DOES give an > instantaneous snapshot of the filesystem, would an xfsdump of an LVM > snapshot of an XFS filesystem give usable backups? Yes, it should. Allthough, some of the postgresql-developers use the term "corrupt database" of a database where the table-files are inconsistant. That's generally _always_ the case when the server is running, as the latest updates are only available in the database-log. That's also the case for the LVM-snapshot. This "inconsistancy" will be fixed by log-replay when you start the server (after restore). If you want to avoid it, you can: - shut down databasee - take snapshot - start database - backup from snapshot There was a long thread on this subject on the postgresql-list a month or two ago. -- Ragnar Kjørstad Big Storage