Re: PITR WAL backups - Mailing list pgsql-admin

From Morus Walter
Subject Re: PITR WAL backups
Date
Msg-id 16897.54334.12163.697101@tanto-xipolis.de
Whole thread Raw
In response to PITR WAL backups  (Mark Reidenbach <m.reidenbach@everytruckjob.com>)
List pgsql-admin
Mark Reidenbach writes:
> The PITR documentation recommends that a user's archive command should
> not overwrite an existing wal archive file, but it appears you need at
> least the wal archive file that matches the .backup marker for the
> recovery process to succeed.  This makes sense because the recovery
> process needs to replay what happened during the time it took to make
> the backup.  The problem I'm having is that you need to backup this wal
> file before it's been archived to have a backup which is consistent, but
> the documentation also states you need to make sure not to overwrite
> existing files in your archive command.
>
...

> Is any of this correct or am I messing up the procedure entirely?
>
I'd like to know that as well, see the 'Online Backup and WAL archives'
thread.
I'm pretty sure that one thing you got wrong, is to say having the WAL
named after the .backup is sufficient for restoring the backup.
At least that's what I understood from your mail.
Depending on the amount of database changes during the backup there may
be a number of WALs created during the backup and I doubt that you can
miss any of them.
The question, how to make sure, to have enough WALs that the backup is
usable, is still open to me.

The general idea of WAL archiving is to keep all WALs so you can do PITR
to any point up to the failure.
But even then, it would be useful to know at which time sufficient WALs
are saved to make the backup useful.

Morus


pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: client authentication problem
Next
From: Pallav Kalva
Date:
Subject: Re: Online Backup and WAL archives