Re: archived WALL files question - Mailing list pgsql-admin

From Renato Oliveira
Subject Re: archived WALL files question
Date
Msg-id 7965A9DCF12CC14984420BCC37B1608F25AC0B99E4@Elzar.grant.co.uk
Whole thread Raw
In response to Re: archived WALL files question  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: archived WALL files question  (Frederiko Costa <frederiko@gmail.com>)
Re: archived WALL files question  (Frederiko Costa <frederiko@gmail.com>)
List pgsql-admin
I am sorry Kevin, I really appreciate your experience and your knowledge, and that's why I am asking; I thought the
basebackup was only necessary once. For example once you have done your first base backup, that is it, all you need is
toreplay the logs and backup the logs. 

What would be the reason(s) for you to do weekly base backups?

Thank you very much

Best regards

Renato



Renato Oliveira
Systems Administrator
e-mail: renato.oliveira@grant.co.uk

Tel: +44 (0)1763 260811
Fax: +44 (0)1763 262410
http://www.grant.co.uk/

Grant Instruments (Cambridge) Ltd

Company registered in England, registration number 658133

Registered office address:
29 Station Road,
Shepreth,
CAMBS SG8 6GB
UK

-----Original Message-----


From: Kevin Grittner [mailto:Kevin.Grittner@wicourts.gov]
Sent: 15 April 2010 17:02
To: Renato Oliveira; pgsql-admin@postgresql.org
Subject: Re: [ADMIN] archived WALL files question

Renato Oliveira <renato.oliveira@grant.co.uk> wrote:

> I was reading again the documentation... "The archive command
> should generally de designed to refuse to overwrite any
> pre-existing archive file."  This means it will keep writing logs
> to the folder specified forever, and without an intervention, the
> media will run out of space.

Overwriting an existing file wouldn't help with that, since the
filenames keep changing.  It might, for example, prevent
accidentally wiping out the WAL files from one database cluster with
WAL files from another by copying the postgresql.conf file and
neglecting to change the archive script.

> What do you guys do with regards to this situation, for example:
> How to you clean up the old archived logs?

We keep two weekly base backups and all the WAL files needed to
recover from the earlier of the two to present.  We also keep an
archival copy of the first base backup of each month with just the
WAL files needed to start it.  We delete WAL files when no longer
needed to support this retention policy.  It's all pretty automatic
based on bash scripts run from cron jobs.

Of course, you'll want to tailor your strategy to your business
needs.

-Kevin



-----Original Message-----


P Please consider the environment before printing this email
CONFIDENTIALITY: The information in this e-mail and any attachments is confidential. It is intended only for the named
recipients(s).If you are not the named recipient please notify the sender immediately and do not disclose the contents
toanother person or take copies. 

VIRUSES: The contents of this e-mail or attachment(s) may contain viruses which could damage your own computer system.
WhilstGrant Instruments (Cambridge) Ltd has taken every reasonable precaution to minimise this risk, we cannot accept
liabilityfor any damage which you sustain as a result of software viruses. You should therefore carry out your own
viruschecks before opening the attachment(s). 

OpenXML: For information about the OpenXML file format in use within Grant Instruments please visit our
http://www.grant.co.uk/Support/openxml.html


pgsql-admin by date:

Previous
From: Samuel Stearns
Date:
Subject: FW: More than 1 pg_database Entry for Database - Thread #2
Next
From: Renato Oliveira
Date:
Subject: Re: archived WALL files question