Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UzTue-0004Ac-Jr for pgsql-admin@arkaria.postgresql.org; Wed, 17 Jul 2013 15:45:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1UzTue-0003UQ-2P for pgsql-admin@arkaria.postgresql.org; Wed, 17 Jul 2013 15:45:08 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UzTuc-0003TC-Ox for pgsql-admin@postgresql.org; Wed, 17 Jul 2013 15:45:06 +0000 Received: from beast.tiendalinux.com ([65.99.217.191]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UzTuY-0004eB-0Z for pgsql-admin@postgresql.org; Wed, 17 Jul 2013 15:45:05 +0000 Received: from localhost (localhost [127.0.0.1]) by beast.tiendalinux.com (Postfix) with ESMTP id 77F4769C0F; Wed, 17 Jul 2013 10:33:50 -0500 (COT) X-Virus-Scanned: Debian amavisd-new at beast.tiendalinux.com Received: from beast.tiendalinux.com ([127.0.0.1]) by localhost (beast.tiendalinux.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id YGsG5UA2Mypp; Wed, 17 Jul 2013 10:33:50 -0500 (COT) X-SMTP-Auth: no X-SMTP-Auth: no Received: from asterix.bog.tiendalinux.com (unknown [190.26.96.114]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "asterix.tiendalinux.com", Issuer "CA Cert Signing Authority" (not verified)) by beast.tiendalinux.com (Postfix) with ESMTPS id CFDBD69C0D; Wed, 17 Jul 2013 10:33:49 -0500 (COT) Received: from localhost (localhost [127.0.0.1]) by asterix.bog.tiendalinux.com (Postfix) with ESMTP id B436D211; Wed, 17 Jul 2013 10:44:58 -0500 (COT) X-Virus-Scanned: Debian amavisd-new at bog.tiendalinux.com Received: from asterix.bog.tiendalinux.com ([127.0.0.1]) by localhost (asterix.bog.tiendalinux.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8Uh6gvHxiHK3; Wed, 17 Jul 2013 10:44:54 -0500 (COT) Received: from [172.24.107.59] (unknown [172.24.107.59]) by asterix.bog.tiendalinux.com (Postfix) with ESMTP id 5423F210; Wed, 17 Jul 2013 10:44:54 -0500 (COT) Message-ID: <51E6BBF6.2000000@tiendalinux.com> Date: Wed, 17 Jul 2013 10:44:54 -0500 From: "Nestor A. Diaz" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: chiru r CC: pgsql-admin@postgresql.org Subject: Re: Help with PITR in PostgreSQL 8.4 References: <51E4725C.3050609@tiendalinux.com> In-Reply-To: Content-Type: multipart/alternative; boundary="------------030105040000080705070005" X-Pg-Spam-Score: 0.4 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org This is a multi-part message in MIME format. --------------030105040000080705070005 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 07/17/2013 03:05 AM, chiru r wrote: > Hi Nestor, > > So the question is: Can I have some continues wal archiving and then > transfer all WAL files to *standby* everyday, recover the database and > backup all data without having to rsync the data every time i make a > backup ? > > Yes,You can do as you mentioned. > > 1) set the below parameters in Postgresql.conf file on Primary server. > > archive_mode=on > archive_command='cp %p /opt/backup/wal_archives/%f' > > 2)apply these wall files to standby server hourly/daily basis as your > requirement. > configure the recovery.conf file. Hi Chiru, I have done archiving on primary server, and recovery on standby server, howerver, after the first recovery I am unable to recover more wal files on standby server Can it be possible in 8.4 ? or just in 9.1 ? This is the recovery I use: << EOF restore_command = '/usr/lib/postgresql/8.4/bin/pg_standby -l -d -s 2 -t /var/run/postgresql/8.4-main.trigger /var/lib/postgresql/8.4/main/wal-archive %f %p %r 2>>/var/log/postgresql/postgresql-8.4-main-standby.log' recovery_end_command = 'rm -f /var/run/postgresql/8.4-main.trigger' EOF Slds. > > Best Regards, > Chiru > -- Typed on my key64.org keyboard Nestor A Diaz --------------030105040000080705070005 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit

On 07/17/2013 03:05 AM, chiru r wrote:
Hi Nestor,

So the question is: Can I have some continues wal archiving and then
transfer all WAL files to *standby* everyday, recover the database and
backup all data without having to rsync the data every time i make a
backup ?

Yes,You can do as you mentioned.

1) set the below parameters in Postgresql.conf file on Primary server.

  archive_mode=on
archive_command='cp %p  /opt/backup/wal_archives/%f'

2)apply these wall files to standby server hourly/daily basis as your requirement.
   configure the recovery.conf file.
Hi Chiru, I have done archiving on primary server, and recovery on standby server, howerver, after the first recovery I am unable to recover more wal files on standby server

Can it be possible in 8.4 ? or just in 9.1 ?

This is the recovery I use:

<< EOF
restore_command = '/usr/lib/postgresql/8.4/bin/pg_standby -l -d -s 2 -t /var/run/postgresql/8.4-main.trigger /var/lib/postgresql/8.4/main/wal-archive %f %p %r 2>>/var/log/postgresql/postgresql-8.4-main-standby.log'
recovery_end_command = 'rm -f /var/run/postgresql/8.4-main.trigger'

EOF

Slds.

  
Best Regards,
Chiru



-- 
Typed on my key64.org keyboard

Nestor A Diaz
--------------030105040000080705070005--