Thread: Getting cozy with weekly PITR

Getting cozy with weekly PITR

From
"Joey K."
Date:
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

 

Re: Getting cozy with weekly PITR

From
Bohdan Linda
Date:
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?