Re: Use hardware snapshots to restore postgres - Mailing list pgsql-admin

From Rosser Schwarz
Subject Re: Use hardware snapshots to restore postgres
Date
Msg-id AANLkTi=Z=kL2-xVwHD46b_EFGJ_hpx2mZPQi_-n8cpNA@mail.gmail.com
Whole thread Raw
In response to Re: Use hardware snapshots to restore postgres  (jigar shah <jshah1982@gmail.com>)
List pgsql-admin
On Sat, Aug 28, 2010 at 7:15 PM, jigar shah <jshah1982@gmail.com> wrote:
> so instead of tar or cpio, i am looking for the procedure where you can use
> hardware level snapshots of the postgres filesystem, which you can take on
> san (3par) or nas (netapp) or any other vendor hardware, and then mount the
> postgres filesystem snapshot to a different host.

I've used this technique on NetApp filers quite a bit.  The critical
step is to issue a CHECKPOINT (and allow time for it to settle,
depending on your checkpoint_completion_target setting) *before*
taking the snapshot.  When you mount the snap elsewhere and start up
another postmaster, it will take a moment to clean up (to the postgres
cluster running against the snap, it will appear as if there was an
unclean shutdown), and you're good to go.

Remember also to synchronize snapping your data and WAL filesystems as
much as possible, if you're using separate volumes for them (as we
did).

I routinely used this technique to populate development and testing
environments, as well as to spin up a secondary instance to use for
backups (i.e., pg_dump), to avoid impacting the production environment
with that IO overhead.

rls

--
:wq

pgsql-admin by date:

Previous
From: Amit jain
Date:
Subject: Re: [Admin] Large DataBase move
Next
From: Mark Rostron
Date:
Subject: plpgsql syntax question