pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Simon Riggs <simon@2ndquadrant.com>
To: Steve Burrows <steve@jla.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Backing up large databases
Date: Wed, 03 May 2006 08:55:57 +0100
Message-ID: <1146642957.449.11.camel@localhost.localdomain> (raw)
In-Reply-To: <44523B85.4020605@jla.com>
References: <44523B85.4020605@jla.com>

On Fri, 2006-04-28 at 15:57 +0000, Steve Burrows wrote:
> I am struggling to find an acceptable way of backing up a PostgreSQL
> 7.4 database. 
> 
> The database is quite large, currently it occupies about 180GB,
> divided into two elements, a set of active tables and a set of archive
> tables which are only used for insertions. 
> 
> I ran pg_dump -Fc recently, it took 23.5 hours to run, and output a
> single file of 126GB. Obviously as the database continues to grow it
> will soon be so large that it cannot be pg_dumped within a day.
> Running rsync to do a complete fresh copy of the pgsql file structure
> took 4 hours, but later that day running another iteration of rsync
> (which should have only copied changed files) took 3 hours, and I
> cannot afford to have the db down that long.
> 
> Anybody with any ideas? 

You need not backup the whole database in one go.

You can copy only changed data out of the tables using your knowledge of
the mail store. That way you'll not need to have such a long running
backup and it won't be so large either. You can then reassemble the
pieces later into a new table in case of recovery.

-- 
  Simon Riggs             
  EnterpriseDB   http://www.enterprisedb.com




view thread (10+ messages)  latest in thread

Message-ID: <1146642957.449.11.camel@localhost.localdomain>
Permalink:  ../1146642957.449.11.camel@localhost.localdomain/
Also on:    postgresql.org/message-id/1146642957.449.11.camel@localhost.localdomain

 · 

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: simon@2ndquadrant.com, steve@jla.com
  Subject: Re: Backing up large databases
  In-Reply-To: <1146642957.449.11.camel@localhost.localdomain>
  References: <44523B85.4020605@jla.com> <1146642957.449.11.camel@localhost.localdomain>

* 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