Re: Recovery from Archive files - Mailing list pgsql-general

From Raghavendra
Subject Re: Recovery from Archive files
Date
Msg-id CA+h6AhgL_R3Kfy89LNzp-iZenAtWoA6nDLLmcUoDF=8h_4n9wQ@mail.gmail.com
Whole thread Raw
In response to Re: Recovery from Archive files  (senthilnathan <senthilnathan.t@gmail.com>)
Responses Re: Recovery from Archive files  (John R Pierce <pierce@hogranch.com>)
List pgsql-general
On Thu, Oct 20, 2011 at 10:01 AM, senthilnathan <senthilnathan.t@gmail.com> wrote:
Thanks John.,

Yes its from WAL Archives. I dont have the basebackup instead i am having
all the WAL files that are archived right from the server start. My question
is how(steps?) to to build whole setup(postgres server)by replaying all WAL
files
(from 000000010000000000000001....................000000010000000100000027)


I think you should give a try on any test box. 

Am assuming you are having $PGDATA (data directory) and their WAL Archives. Take a copy of these to your test box and follow below steps.

1. Remove postmaster.pid from $PGDATA
2. Create recovery.conf file in $PGDATA directory.
    vi recovery.conf
            restore_command = ' cp /WAL Archives destination/%f %p'
            recovery_target_time = '2011-10-20 14:30:25'  
    :wq

    Note: Here target_time is your current rebuild time, because you want to replay all WAL Archives which are available.

3. Start the instance and check $PGDATA/pg_log/.log file on to know how recovery process went.


---
Regards,
Raghavendra
EnterpriseDB Corporation

pgsql-general by date:

Previous
From: Birta Levente
Date:
Subject: archive_timeout runtime change
Next
From: Raymond O'Donnell
Date:
Subject: Re: psqlODBC connection