Re: Basic question on recovery and disk snapshotting - Mailing list pgsql-general

From Ben Chobot
Subject Re: Basic question on recovery and disk snapshotting
Date
Msg-id F065BDA0-9D07-4E14-8D34-06BD66FA8122@silentmedia.com
Whole thread Raw
In response to Re: Basic question on recovery and disk snapshotting  (Yang Zhang <yanghatespam@gmail.com>)
List pgsql-general
On Apr 27, 2013, at 10:40 AM, Yang Zhang wrote:

My question really boils down to: if we're interested in using COW
snapshotting (a common feature of modern filesystems and hosting
environments), would we necessarily need to ensure the data and
pg_xlog are on the same snapshotted volume?  If not, how should we be
taking the snapshots - should we be using pg_start_backup() and then
taking the snapshot of one before the other?  (What order?)  What if
we have tablespaces, do we take snapshots of those, followed by the
cluster directory, followed by pg_xlog?

We do this, using xfs to take advantage of being able to freeze the filesystem. (Because we're also using software raid.) The process looks like:

1. pg_start_backup()
2. xfs_freeze both the data and xlog filesystems.
3. snapshot all volumes.
4. unfreeze
5. stop backup

pgsql-general by date:

Previous
From: Jeff Janes
Date:
Subject: Re: zLinux Load Testing Experience
Next
From: Merlin Moncure
Date:
Subject: Re: zLinux Load Testing Experience