Re: [linux-lvm] PostgreSQL and file system level backup

From: Ragnar Kjørstad <lvm(at)ragnark(dot)vestdata(dot)no>
To: linux-lvm(at)sistina(dot)com
Cc: Postgres Admin List <pgsql-admin(at)postgresql(dot)org>, "Linux-Xfs (E-mail)" <linux-xfs(at)oss(dot)sgi(dot)com>
Subject: Re: [linux-lvm] PostgreSQL and file system level backup
Date: 2002-11-16 02:10:32
Message-ID: 20021116031032.V17827@vestdata.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Bruce Momjian 2002-11-16 03:03:32 Re: Missing data frrom a shutdown
Previous Message Murthy Kambhampaty 2002-11-15 21:25:49 PostgreSQL and file system level backup