Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1epVCr-0001VQ-P4 for pgsql-general@arkaria.postgresql.org; Sat, 24 Feb 2018 08:29:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1epVCo-0003j7-Oq for pgsql-general@arkaria.postgresql.org; Sat, 24 Feb 2018 08:29:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1epVCo-0003ix-H7 for pgsql-general@lists.postgresql.org; Sat, 24 Feb 2018 08:29:18 +0000 Received: from mail.i-mark.de ([188.138.104.222]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1epVCl-00015D-DO for pgsql-general@lists.postgresql.org; Sat, 24 Feb 2018 08:29:17 +0000 Received: from [192.168.222.106] (p5B31311B.dip0.t-ipconnect.de [91.49.49.27]) by mail.i-mark.de (Postfix) with ESMTPSA id AC7371580750 for ; Sat, 24 Feb 2018 09:29:10 +0100 (CET) Authentication-Results: loft7616.startdedicated.de; spf=pass (sender IP is 91.49.49.27) smtp.mailfrom=andreas@a-kretschmer.de smtp.helo=[192.168.222.106] Received-SPF: pass (loft7616.startdedicated.de: connection is authenticated) Subject: Re: pg_update to a new machine? To: pgsql-general@lists.postgresql.org References: <09489f15-b756-9e6d-c081-a8cdf0f9b483@cox.net> From: Andreas Kretschmer Message-ID: <43ba3bf9-9853-4516-d222-059304aaaba2@a-kretschmer.de> Date: Sat, 24 Feb 2018 09:29:12 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <09489f15-b756-9e6d-c081-a8cdf0f9b483@cox.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Am 24.02.2018 um 04:57 schrieb Ron Johnson: > The 2.8TB database must be moved to a new server in a new Data Center, > and upgraded from 8.4.17 to 9.6.6 > > Will this work? > > pg_upgrade > --old-datadir "CURSERVER://var/lib/pgsql/data" > --new-datadir "NEWSERVER://var/lib/pgsql/data" > --old-bindir "CURSERVER://usr/bin" > --new-bindir "NEWSERVER://usr/bin" > Or must I: > 1. temporarily allocate 3TB of scratch space on the new server, > 2. install 8.4 on the new server, > 3. install 9.6.6 on the new server, > 2. rsync CURSERVER://var/lib/pgsql/data to > NEWSERVER://var/lib/pgsql/8.4/data, and then > 3. pg_upgrade? > > Are there better ways?  (The pipe from current DC to new DC will be > 10Gbps.) > it's a big step from 8.4 to 9.6... If you can do that with a downtime i would prefer dump & restore. A solution without (big) downtime would be replication with slony or londiste. Regards, Andreas -- 2ndQuadrant - The PostgreSQL Support Company. www.2ndQuadrant.com