Skip site navigation (1) Skip section navigation (2)

Re: archived WALL files question

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Renato Oliveira" <renato(dot)oliveira(at)grant(dot)co(dot)uk>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: archived WALL files question
Date: 2010-04-15 16:01:49
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
Renato Oliveira <renato(dot)oliveira(at)grant(dot)co(dot)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

In response to


pgsql-admin by date

Next:From: Vitaly BurshteynDate: 2010-04-15 16:07:34
Subject: Re: archived WALL files question
Previous:From: Scott MeadDate: 2010-04-15 15:56:44
Subject: Re: archived WALL files question

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group