Re: Recovery from Archive files

From: Raghavendra <raghavendra(dot)rao(at)enterprisedb(dot)com>
To: senthilnathan <senthilnathan(dot)t(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Recovery from Archive files
Date: 2011-10-20 09:33:26
Message-ID: CA+h6AhgL_R3Kfy89LNzp-iZenAtWoA6nDLLmcUoDF=8h_4n9wQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Oct 20, 2011 at 10:01 AM, senthilnathan
<senthilnathan(dot)t(at)gmail(dot)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
Blog: http://raghavt.blogspot.com/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2011-10-20 10:24:08 Re: psqlODBC connection
Previous Message Birta Levente 2011-10-20 08:39:15 archive_timeout runtime change