Re: [GENERAL] Recovery from Archive files

2011-10-24 Thread Ian Harding
On Thu, Oct 20, 2011 at 11:42 AM, Raghavendra
raghavendra@enterprisedb.com wrote:
 On Thu, Oct 20, 2011 at 11:58 PM, John R Pierce pie...@hogranch.com wrote:

 On 10/20/11 2:33 AM, Raghavendra wrote:

 Am assuming you are having $PGDATA (data directory) and their WAL
 Archives.

 he said he does not have the base backup ($PGDATA), so this is pointless.

 Ahh.. Agreed.
 I mis-read, I though he is trying to recovery from current DATA directory
 and not with base backup which he doesn't have it.
 ---
 Regards,
 Raghavendra
 EnterpriseDB Corporation
 Blog: http://raghavt.blogspot.com/


I thought if you had every log file ever generated from initdb, you
could initdb, and start replaying logs?  It's an odd scenario, but I
thought I heard that could work... Come to think of it, I think that
was an Oracle thing I heard... but still.. if you had every log
file

- Ian

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Recovery from Archive files

2011-10-20 Thread John R Pierce

On 10/19/11 9:31 PM, senthilnathan 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


WAL file archives are like successive differences from the base backup.

without the base backup, they are useless.


--
john r pierceN 37, W 122
santa cruz ca mid-left coast


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Recovery from Archive files

2011-10-20 Thread Raghavendra
On Thu, Oct 20, 2011 at 10:01 AM, senthilnathan
senthilnatha...@gmail.comwrote:

 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 00010001000100010027)


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/


Re: [GENERAL] Recovery from Archive files

2011-10-20 Thread John R Pierce

On 10/20/11 2:33 AM, Raghavendra wrote:
Am assuming you are having $PGDATA (data directory) and their WAL 
Archives.


he said he does not have the base backup ($PGDATA), so this is pointless.



--
john r pierceN 37, W 122
santa cruz ca mid-left coast


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Recovery from Archive files

2011-10-20 Thread Raghavendra
On Thu, Oct 20, 2011 at 11:58 PM, John R Pierce pie...@hogranch.com wrote:

 On 10/20/11 2:33 AM, Raghavendra wrote:

 Am assuming you are having $PGDATA (data directory) and their WAL
 Archives.


 he said he does not have the base backup ($PGDATA), so this is pointless.

 Ahh.. Agreed.
I mis-read, I though he is trying to recovery from current DATA directory
and not with base backup which he doesn't have it.

---
Regards,
Raghavendra
EnterpriseDB Corporation
Blog: http://raghavt.blogspot.com/


Re: [GENERAL] Recovery from Archive files

2011-10-19 Thread John R Pierce

On 10/19/11 4:57 AM, senthilnathan wrote:

How to recover a standalone postgres setup using archive files alone? What
are the steps/config involved?


'archive files' ?  you mean a WAL archive? you need the base backup 
*and* all WAL files since to recover with that.


--
john r pierceN 37, W 122
santa cruz ca mid-left coast


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Recovery from Archive files

2011-10-19 Thread senthilnathan
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 00010001000100010027)  

--
View this message in context: 
http://postgresql.1045698.n5.nabble.com/Recovery-from-Archive-files-tp4917420p4920328.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general