Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WVf7W-0001Aa-J9 for pgsql-bugs@arkaria.postgresql.org; Thu, 03 Apr 2014 10:43:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WVf7W-0005L0-3J for pgsql-bugs@arkaria.postgresql.org; Thu, 03 Apr 2014 10:43:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WVf7V-0005Kt-4x for pgsql-bugs@postgresql.org; Thu, 03 Apr 2014 10:43:41 +0000 Received: from smtp-outbound-1.vmware.com ([208.91.2.12]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WVf7R-00021s-PL for pgsql-bugs@postgresql.org; Thu, 03 Apr 2014 10:43:40 +0000 Received: from sc9-mailhost3.vmware.com (sc9-mailhost3.vmware.com [10.113.161.73]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id D5107289FF; Thu, 3 Apr 2014 03:43:33 -0700 (PDT) Received: from zcs-prod-ext-mta-1.vmware.com (zcs-prod-ext-mta-1.vmware.com [10.113.62.223]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id CFC7B40C4F; Thu, 3 Apr 2014 03:43:33 -0700 (PDT) Received: from zcs-prod-ext-mta-1.vmware.com (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTP id E8804120032; Thu, 3 Apr 2014 03:43:27 -0700 (PDT) Received: from [192.168.1.90] (zimbra-prod-ext-proxy-vip.vmware.com [10.113.63.87]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTPSA; Thu, 3 Apr 2014 03:43:27 -0700 (PDT) Message-ID: <533D3B52.4060909@vmware.com> Date: Thu, 03 Apr 2014 13:43:30 +0300 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10 MIME-Version: 1.0 To: fburgess@radiantblue.com CC: pgsql-bugs@postgresql.org Subject: Re: Configuring Standby Server in PostgreSQL 9.3.3 References: <20140402110749.5a830134ae84016b0174832fdc1a3173.28ee073a59.wbe@email11.secureserver.net> In-Reply-To: <20140402110749.5a830134ae84016b0174832fdc1a3173.28ee073a59.wbe@email11.secureserver.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -7.5 (-------) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 04/02/2014 09:07 PM, fburgess@radiantblue.com wrote: > We are in the process of setting up a standby server. Instead of restoring from > a backup taken from primary server, > we want to shutdown the primary server, and then copy the primary database VM > image to the standby server. > > We want to do this because our database is 7TB and takes 4-5 to backup and 8-9 > days to restore to the standby server. > > Mock Primary :192.168.1.50 > Mock standby:192.168.1.100 > > 1.) Configure pg_hda.conf on primary > > # Allow the user "postgres" from host 192.168.1.100 to connect to the primary > # as a replication standby if the user's password is correctly supplied. > # > # TYPE DATABASE USER ADDRESS METHOD > host replication postgres 192.168.1.100/32 md5 > > > 2.) Configure recovery.conf on standby > > standby_mode = 'on' > primary_conninfo = 'host=192.168.1.50 port=5432 user=postgres password=foopass' > restore_command = 'cp /path/to/archive/%f %p' > archive_cleanup_command = 'pg_archivecleanup /path/to/archive %r' > > 3.) re-start both servers > > Question #1 Is this feasible? > Question #2 Have I missed critical steps? The short answer is: yes, it's feasible. I think you got steps right. But I agree with the other discussions that it really shouldn't take days to do a filesystem-level backup/restore of a 7TB database, which is what you need to set up a standby. There must be some misunderstanding there. - Heikki -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs