Re: Seeking information about backup/recovery

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Murthy Kambhampaty <murthy(dot)kambhampaty(at)goeci(dot)com>
Cc: Mary Edie Meredith <maryedie(at)osdl(dot)org>, pgsql-admin(at)postgresql(dot)org, osdldbt-general <osdldbt-general(at)lists(dot)sourceforge(dot)net>
Subject: Re: Seeking information about backup/recovery
Date: 2003-09-05 00:32:38
Message-ID: 200309050032.h850WcB18836@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Murthy Kambhampaty wrote:
> >Anyway, unfortunately, WAL doesn't contain enough information
> >to recover
> >without having the file system files in some consistent state, even if
> >that state is old. In fact, the files have to be consistent as of the
> >last checkpoint.
> This, I'm not so sure of. On Linux, an xfs_freeze -f <fs_to_freeze> pauses
> the filesystem and flushes all writes to disk; a snapshot of $PGDATA's
> filesystem taken while it is frozen gives a consistent copy of $PGDATA as of
> that instant (similar functionality is obtained by compiling the VFS locking
> patch into the kernel).
>
> The discussion at
> http://marc.theaimsgroup.com/?l=postgresql-admin&w=2&r=1&s=LVM+snapshots&q=b
> , includes log files from postmaster startup and shutdown on the backup
> $PGDATA, and AFAICT, WAL recovery does not roll back to the last checkpoint.
> If there is a better way to test this, let me know, and I'm happy to do it.

Yes, this has been discussed before. If you snapshot xfs, you can then
restore using that snapshot. Of course, you will be recovering from WAL
as though there was a crash, but that works fine.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message colin roald 2003-09-05 01:14:49 age of statistics
Previous Message Murthy Kambhampaty 2003-09-04 23:29:20 Re: Seeking information about backup/recovery