Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 07B1B1337C93 for ; Mon, 3 Jan 2011 17:09:04 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 40657-01-7 for ; Mon, 3 Jan 2011 21:08:56 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp1a.aso.ee (smtp1a.aso.ee [213.184.32.86]) by mail.postgresql.org (Postfix) with ESMTP id 7C3F51337B6E for ; Mon, 3 Jan 2011 17:06:11 -0400 (AST) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp1a.aso.ee (Postfix) with ESMTP id 55D554D919; Mon, 3 Jan 2011 23:06:10 +0200 (EET) X-Virus-Scanned: Debian amavisd-new at smtp1a.avalik.kit Received: from smtp1a.aso.ee ([127.0.0.1]) by localhost (smtp1a.avalik.kit [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SZYbXNYyGXMs; Mon, 3 Jan 2011 23:06:10 +0200 (EET) Received: from [172.19.10.30] (unknown [172.19.10.30]) by smtp1a.aso.ee (Postfix) with ESMTP id 2E8A74D918; Mon, 3 Jan 2011 23:06:10 +0200 (EET) Message-ID: <4D223A41.1060102@auul.pri.ee> Date: Mon, 03 Jan 2011 23:06:09 +0200 From: Imre Oolberg User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101226 Icedove/3.0.11 MIME-Version: 1.0 To: Tom Lane CC: Scott Ribe , pgsql-admin@postgresql.org Subject: Re: Re: pg v. 8.4.5 misses objects and data after restoring from backup using wal References: <4D2213EB.7090700@auul.pri.ee> <42066935-6D27-46E3-8094-836D204816B7@elevated-dev.com> <22500.1294080152@sss.pgh.pa.us> <22730.1294081008@sss.pgh.pa.us> <4D222E45.2080701@auul.pri.ee> <24373.1294086266@sss.pgh.pa.us> In-Reply-To: <24373.1294086266@sss.pgh.pa.us> Content-Type: multipart/alternative; boundary="------------020909070909040801070203" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201101/22 X-Sequence-Number: 36462 This is a multi-part message in MIME format. --------------020909070909040801070203 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi! On 01/03/11 22:24, Tom Lane wrote: > I wonder whether you're failing to copy the backup_label file as part of > the base backup. The presence of that file is what tells the slave > postmaster where it has to start recovering from. > > regards, tom lane > Thank you so much for your attention, i really need to learn reading postgresql.org manuals, probably already a long time ago i learned from somewhere that i need to delete backup_label file before starting up wal-recoverying database and i did, as presented in my first mail Restore went like this 1. mounted /mnt/backup/ under /var/lib/postgresql 2. removed backup_label 3. created recovery.conf with a line restore_command = 'cp /data/backup/postgresql/archive-logs/%f %p' 4. emptied pg_xlog directory while having directory itself 5. started postgresql and it finishes accepting connections Now everything works, in the process backup_label gets renamed backup_label.old, thanks again for your attention! Still lucky it was mistake in the recovery procedure having my backups made so far still usable :) Imre --------------020909070909040801070203 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi!

On 01/03/11 22:24, Tom Lane wrote:
I wonder whether you're failing to copy the backup_label file as part of
the base backup.  The presence of that file is what tells the slave
postmaster where it has to start recovering from.

			regards, tom lane
  

Thank you so much for your attention, i really need to learn reading postgresql.org manuals, probably already a long time ago i learned from somewhere that i need to delete backup_label file before starting up wal-recoverying database and i did, as presented in my first mail

Restore went like this

1. mounted /mnt/backup/ under /var/lib/postgresql
2. removed backup_label
3. created recovery.conf with a line

restore_command = 'cp /data/backup/postgresql/archive-logs/%f %p'

4. emptied pg_xlog directory while having directory itself
5. started postgresql and it finishes accepting connections

Now everything works, in the process backup_label gets renamed backup_label.old, thanks again for your attention! Still lucky it was mistake in the recovery procedure having my backups made so far still usable :)


Imre

--------------020909070909040801070203--