Re: archived WALL files question

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: archived WALL files question
Дата
Msg-id 4BC6F21D0200002500030956@gw.wicourts.gov
обсуждение исходный текст
Ответ на archived WALL files question  (Renato Oliveira <renato.oliveira@grant.co.uk>)
Ответы Re: archived WALL files question  (Renato Oliveira <renato.oliveira@grant.co.uk>)
Список pgsql-admin
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

В списке pgsql-admin по дате отправления:

Предыдущее
От: Scott Mead
Дата:
Сообщение: Re: archived WALL files question
Следующее
От: "Vitaly Burshteyn"
Дата:
Сообщение: Re: archived WALL files question