Re: How-To Consitent EC2 Snapshots with Postgres - Mailing list pgsql-general

From Magnus Hagander
Subject Re: How-To Consitent EC2 Snapshots with Postgres
Date
Msg-id 9837222c0910310815h458bb160s138134162e99e78d@mail.gmail.com
Whole thread Raw
In response to How-To Consitent EC2 Snapshots with Postgres  ("saturon" <gsaturon@gmail.com>)
Responses Re: How-To Consitent EC2 Snapshots with Postgres
List pgsql-general
On Sat, Oct 31, 2009 at 15:44, saturon <gsaturon@gmail.com> wrote:

Hi all,

I am fairly new to postgres admin so please bear with me.

I am looking for a way to create a consitent EC2 snapshot of a postgres DB that is running in a Debian Lenny instance, XFS file system on a EBS . I was following Eric Hammons posts http://ec2ebs-mysql.notlong.com/  http://alestic.com/2009/09/ec2-consistent-snapshot on creating Snapshost for MySQL and would like to port his efforts to Postgres.

I am really looking just for some documentation of this whole area since I am sitting here a bit in the blue ;) (e.g. I heard of LVM but do not know it and not sure if this is the way to go)


As long as EBS snapshots are atomic (which I think they are, but don't know for sure), you can just do the snapshot, no need to do anything extra. PostgreSQL will then go into normal crash recovery when you start up another instance on the snapshot. Note that this requires that all your PostgreSQL data (including the data directory, xlog and *all* tablespaces) are on the same EBS volume - I'm pretty sure they can't do atomic snapshots across multiple volumes.


--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

pgsql-general by date:

Previous
From: "saturon"
Date:
Subject: How-To Consitent EC2 Snapshots with Postgres
Next
From: Greg Smith
Date:
Subject: Re: How-To Consitent EC2 Snapshots with Postgres