Getting cozy with weekly PITR

Lists: pgsql-general
From: "Joey K(dot)" <pguser(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Getting cozy with weekly PITR
Date: 2008-09-22 07:41:47
Message-ID: 467669b30809220041n383882bbqd17e4048bab7c07a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hello,

Thanks for advice/suggestions on PITR so far.

We have finally decided to do weekly PITR base backups. Just have one
nagging question.

== week 1==-
* pg_start_backup()
* tar -cvzf basebackup_week1.tar.gz pgdata/
* pg_stop_backup()

cp WAL1 week1/wal/
..
cp WAL2 week1/wal/
==*==

Week 1, we perform base backup and WAL will be backed up by PG.

==week 2==
* pg_start_backup()
* tar -cvzf basebackup_week2.tar.gz pgdata
* pg_stop_backup()
cp WAL1 week2/wal/
...
cp WAL2 week2/wal
...
rm -f basebackup_week1.tar.gz
rm -rf week1/wal
==*==

During week 2, after the base backup, can we remove week 1's base and WAL
files?

I assume this is okay since week 2's PITR backup is as good as new but just
wanted to be doubly sure about it before we get rid of week 1's backup.

Steve


From: Bohdan Linda <bohdan(dot)linda(at)seznam(dot)cz>
To: "Joey K(dot)" <pguser(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Getting cozy with weekly PITR
Date: 2008-09-22 08:37:57
Message-ID: 20080922083757.GA25196@bafster.baflabs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general


pg_start_backup will flush old transactions, thus you have full DB backup.
Unless you want them archived, no need to keep them

Regards,
Bohdan

On Mon, Sep 22, 2008 at 09:41:47AM +0200, Joey K. wrote:
> During week 2, after the base backup, can we remove week 1's base and WAL
> files?