pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gilberto Castillo <gilberto.castillo@etecsa.cu>
To: Albe Laurenz <laurenz.albe@wien.gv.at>
Cc: 'Gustav Karlsson *EXTERN*' <gustav.karlsson@bekk.no>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: Deleting old WAL-files
Date: Tue, 19 May 2015 08:29:34 -0500 (GMT+5)
Message-ID: <59237.192.168.207.54.1432042174.squirrel@webmail.etecsa.cu> (raw)
In-Reply-To: <A737B7A37273E048B164557ADEF4A58B36612994@ntex2010i.host.magwien.gv.at >
References: <5FB35597-0F52-4832-973D-908F5B01BE9B@bekk.no>
	<A737B7A37273E048B164557ADEF4A58B36612994@ntex2010i.host.magwien.gv.at>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>



> Gustav Karlsson wrote:
>> I am looking for a good method of determining what WAL-segments can be
>> deleted from our backup-
>> archive.
>>
>> We are using Postgresql 9.3 and do nightly basebackups along with
>> archiving of WAL-segments.
>>
>> We would like to prevent our backup-archive from growing forever, and
>> thus delete basebackups and WAL-
>> segments older than say 1 year.
>>
>> Is there a good way of finding the oldest WAL-segment needed for a given
>> basebackup? (If not, what is
>> the typical method for deleting old WAL-segments?)
>
> The backup contains a file "backup_label" which contains a line like
>
> START WAL LOCATION: 0/83000028 (file 000000010000000000000083)
>
> That is the oldest file needed for recovery.
>
> But a simple solution would be to keep WAL archives for one day more than
> your oldest
> base backup, that way you can never miss a WAL archive that you need.

See you:

http://www.postgresql.org/docs/current/static/pgarchivecleanup.html



Saludos,
Gilberto Castillo
ETECSA, La Habana, Cuba
--- 
This message was processed by Kaspersky Mail Gateway 5.6.28/RELEASE running at host imx3.etecsa.cu
Visit our web-site: <http://www.kaspersky.com;, <http://www.viruslist.com;

-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

view thread (6+ messages)  latest in thread

Message-ID: <59237.192.168.207.54.1432042174.squirrel@webmail.etecsa.cu>
Permalink:  ../59237.192.168.207.54.1432042174.squirrel@webmail.etecsa.cu/
Also on:    postgresql.org/message-id/59237.192.168.207.54.1432042174.squirrel@webmail.etecsa.cu

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: gilberto.castillo@etecsa.cu, laurenz.albe@wien.gv.at, gustav.karlsson@bekk.no
  Subject: Re: Deleting old WAL-files
  In-Reply-To: <59237.192.168.207.54.1432042174.squirrel@webmail.etecsa.cu>

* 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