Re: WAL file questions - how to relocate on Windows, how to replay after total loss, etc - Mailing list pgsql-general

From Douglas McNaught
Subject Re: WAL file questions - how to relocate on Windows, how to replay after total loss, etc
Date
Msg-id 5ded07e00808280821u456adb88m582e71083f1e85b1@mail.gmail.com
Whole thread Raw
In response to WAL file questions - how to relocate on Windows, how to replay after total loss, etc  ("John T. Dow" <john@johntdow.com>)
Responses Re: WAL file questions - how to relocate on Windows, how to replay after total loss, etc  ("John T. Dow" <john@johntdow.com>)
List pgsql-general
On Thu, Aug 28, 2008 at 10:57 AM, John T. Dow <john@johntdow.com> wrote:
> BACKGROUND INFO BEGINS
>
> Recently I had some questions about doing backups and received very helpful replies. I have now put together a BAT
fileto do a routine backup, using pg_dumpall with the -g option to get the roles, and pg_dump with the custom format to
getall the data. 
>
> I am now testing this process to make sure it is possible to recover data up to the last minute in the event of a
catastrophicserver failure. 

You have a fundamental misunderstanding of how this works.  You can't
apply saved WAL files to a database restored from a dump.  To use
PITR, you need to do a physical backup of the actual database files
(after calling the pg_start_backup() function), then when that is
done, call pg_stop_backup().  You then archive WAL files as the
database runs normally.

To recover, you do a physical restore of the database files, then run
recovery using the archived WAL files.

Read the documentation on PITR again--it's reasonably complete.

-Doug

pgsql-general by date:

Previous
From: Bill Moran
Date:
Subject: Re: Vaccuum best practice: cronjob or autovaccuum?
Next
From: Gregory Stark
Date:
Subject: Re: indexes on functions and create or replace function