pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris Browne <cbbrowne@acm.org>
To: pgsql-admin@postgresql.org
Subject: Re: Backup - filesystem snapshots
Date: Wed, 18 Jan 2006 17:00:40 -0500
Message-ID: <60fynlnqlz.fsf@dba2.int.libertyrms.com> (raw)
References: <43CEA0D8.8060901@lancaster.ac.uk>

c.jewell@lancaster.ac.uk (Chris Jewell) writes:
> I'm trying to implement a backup strategy for a research database in
> order to prevent again users accidentally dropping their data.
>
> My preferred method would be to create regular snapshots of the data
> directory, and then send this to the backup server using rsync, with
> hard-linking backup rotation.  The backup data directories could then be
> examined using a postmaster running on the backup server to extract any
> accidentally deleted tables.
>
> My problem is how to do these snapshots: is it enough to create a hard
> link to the directory, or is there still a risk that a currently running
> transaction might introduce inconsistencies?  I guess I could use the
> pg_ctl -m 'Smart' command to stop the database after all clients have
> disconnected, but I sometimes have users leaving their clients connected
> all night.  Is there any other way to suspend the postmaster such that
> it finishes its current transaction and queues any other transactions
> while the snapshot is taking place?  Any other ideas of how I can create
> such snapshots?

Short answer to "is there a risk?" is "You betcha!"

There's a fairly new feature called Point in Time Recovery that is
specifically designed to address those risks.

<http://www.postgresql.org/docs/8.1/static/backup-online.html;
-- 
let name="cbbrowne" and tld="ntlug.org" in String.concat "@" [name;tld];;
http://cbbrowne.com/info/advocacy.html
The English exam was a piece  of cake---which was a bit of a surprise,
actually, because I was expecting some questions on a sheet of paper.



view thread (4+ messages)  latest in thread

Message-ID: <60fynlnqlz.fsf@dba2.int.libertyrms.com>
Permalink:  ../60fynlnqlz.fsf@dba2.int.libertyrms.com/
Also on:    postgresql.org/message-id/60fynlnqlz.fsf@dba2.int.libertyrms.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: cbbrowne@acm.org
  Subject: Re: Backup - filesystem snapshots
  In-Reply-To: <60fynlnqlz.fsf@dba2.int.libertyrms.com>
  References: <43CEA0D8.8060901@lancaster.ac.uk> <60fynlnqlz.fsf@dba2.int.libertyrms.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox