Re: Problem with PITR recovery

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Problem with PITR recovery
Дата
Msg-id 200504180420.j3I4KeS21339@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Problem with PITR recovery  (Jeff Davis <jdavis-pgsql@empires.org>)
Ответы Re: Problem with PITR recovery  (Jeff Davis <jdavis-pgsql@empires.org>)
Re: Problem with PITR recovery  (Oleg Bartunov <oleg@sai.msu.su>)
Список pgsql-hackers
Jeff Davis wrote:
> 
> I could still use a little clarification. It seems sort of like there is
> an extra step, like:
> 
> (1) start archiving
> (2) pg_start_backup()
> (3) copy PGDATA directory with tar
> (4) pg_stop_backup()
> (5) ??
> 
> And the text you have at
> http://candle.pha.pa.us/main/writings/pgsql/sgml/backup-online.html
> 
> says: "To make use of this backup, you will need to keep around all the
> WAL segment files generated during and after the file system backup.".
> 
> How long after? Wouldn't you be keeping the WAL segments afterward
> anyway by archiving?
> 
> I've tested and been able to recover using PITR before, but I'd like a
> little clarification on the steps to make absolutely sure that the base
> backup I have is viable.
> 
> Can you sort of run through the failure case again, and how to prevent
> it?

The failure case in the original docs is that you do your
pg_stop_backup(), and then delete all the WAL file before the *.backup
file that was just created.  However, you do not have a valid tar backup
until you have archived all the WAL files used from the *.backup WAL
file up to the WAL file that was active at pg_stop_backup(), which is
mentioned in the *.backup file.  If you went and deleted your old WAL
files anyway, without waiting for those other WAL files to be archived,
and your disk drive crashed, you wouldn't have a tar backup you could
use, and you had deleted the old WAL files you would have needed to
recover your previous tar backup.

Is there something in the current wording that needs clarification?

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Problem with PITR recovery
Следующее
От: ElayaRaja S
Дата:
Сообщение: Urgent