pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Frederiko Costa <frederiko@gmail.com>
To: Renato Oliveira <renato.oliveira@grant.co.uk>
To: pgsql-admin@postgresql.org
Subject: Re: archived WALL files question
Date: Fri, 16 Apr 2010 12:15:46 -0500
Message-ID: <4BC854F202000025000309F8@gw.wicourts.gov> (raw)
In-Reply-To: <4BC8904E.2000906@gmail.com>
References: <7965A9DCF12CC14984420BCC37B1608F25AC0B99AD@Elzar.grant.co.uk>
	<4BC6F21D0200002500030956@gw.wicourts.gov>
	<7965A9DCF12CC14984420BCC37B1608F25AC0B99E4@Elzar.grant.co.uk>
	<4BC8904E.2000906@gmail.com>

Renato Oliveira wrote:
 
> I thought the base backup was only necessary once. For example
> once you have done your first base backup, that is it, all you
> need is to replay the logs and backup the logs.  What would be
> the reason(s) for you to do weekly base backups?
 
There are a few reasons, many of which are probably not applicable
to most environments.
 
(1)  Most of our source databases are spread around the state --
some over 300 miles away (500 km for those with sane units of
measure).  Management has mandated that we must have backups in our
central location which have been restored to confirm usability, as
well as a copy of the backup files in the source locations.  We
don't have equipment at the source locations to keep a warm standby
running, so a recovery there would need to replay all WAL files
since the base backup.  A weekly cycle for base backups keeps the
set of WAL files we need to keep relatively small and allows
relatively rapid recovery.
 
(2)  Because of the large number of database clusters being backup
up (about 100), it is not feasible to actually have warm standbys
for all of them which we can just switch to in case of emergency. 
We use one rather largish machine to host a all the "warm standby"
instances, just to make sure that the WAL files are applying without
error to the base backups.  We keep three machines prepped and ready
to go for emergencies, but we have to do the whole PITR recovery
from the base backup to get a production-ready copy.  Again, the
shorter the time from the base backup, the fewer WAL files to apply,
and the sooner we're ready to go.
 
(3)  We're mandated to keep monthly archival "snapshot" backups, so
we just grab the first weekly base backup of each month, with the
minimum set of WAL files needed to get it running (determined by the
.backup file).
 
(4)  A fair amount of paranoia.  If any subtle bugs affecting corner
cases were ever to creep into the software, the affects would be
minimized by using a fresher base backup and fewer WAL files.
 
I have heard of people running warm standbys for months without
getting a fresh base, and for many users that may be the best
option.  Our situation is pretty unique -- although when I say that,
people are usually quick to point out that so is everyone else's. 
;-)
 
-Kevin



view thread (15+ messages)  latest in thread

Message-ID: <4BC854F202000025000309F8@gw.wicourts.gov>
Permalink:  ../4BC854F202000025000309F8@gw.wicourts.gov/
Also on:    postgresql.org/message-id/4BC854F202000025000309F8@gw.wicourts.gov

 · 

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: Kevin.Grittner@wicourts.gov, frederiko@gmail.com, renato.oliveira@grant.co.uk
  Subject: Re: archived WALL files question
  In-Reply-To: <4BC854F202000025000309F8@gw.wicourts.gov>
  References: <7965A9DCF12CC14984420BCC37B1608F25AC0B99AD@Elzar.grant.co.uk> <4BC6F21D0200002500030956@gw.wicourts.gov> <7965A9DCF12CC14984420BCC37B1608F25AC0B99E4@Elzar.grant.co.uk> <4BC8904E.2000906@gmail.com> <4BC854F202000025000309F8@gw.wicourts.gov>

* 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