Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ivpKu-0003f2-My for pgsql-general@arkaria.postgresql.org; Sun, 26 Jan 2020 21:20:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ivpKs-0003aY-PD for pgsql-general@arkaria.postgresql.org; Sun, 26 Jan 2020 21:20:50 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1ivpKr-0003aR-MA for pgsql-general@lists.postgresql.org; Sun, 26 Jan 2020 21:20:50 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ivpKj-0006Pb-Gf for pgsql-general@postgresql.org; Sun, 26 Jan 2020 21:20:49 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 35D9F414; Sun, 26 Jan 2020 16:20:39 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 26 Jan 2020 16:20:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=x ctDYkxjFZmRQar/MUb39RTO6fOpqh5UflQ+yYkWDoI=; b=rvF6X3al16f8u9RSf SU7sjDEvbHimlHh0HejEWzqoS8DPa8i9bm8DcQ6uGgzft/6w9sPpVKWuRJdB7qEn mvp1MMFH6V7yOtqGftMQjADfY/VC8cYkhy21cFV44U6ijqs3pCjnOAUACoCh6RCt GKflDAQRUsuv11gSSCNg+C15OC1EdyaZ6j5sl52kfOZAsF9oiTauZ0aHh6O/HQZv cB7bkl4tqZe1Uz1ghesrgS/yZt0o15YBBV/cpG0CDUTBXbAyUBljjUu/BvYxItOA pkRX/7efCIMqew1agl8SjmIRRtBU3Lq8pBlIOQKk1hc+jwl94wgAjgHfLfKzq/Y/ o+NAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=xctDYkxjFZmRQar/MUb39RTO6fOpqh5UflQ+yYkWD oI=; b=jiHO5wy1FFa299jgw+FbutnZZNmERpqJ4Ajxn5UlfJd4hE1mobJXaEkR7 Pw9fUbQ5H5ktL46sUggiyrle0jS6yCF+3K7VcsRCgTqIcrTL3C/g83BI9qyvW3Xc mRiZP9j9UA/ck/UAlf7CPjlK7/yRP0NcZpuDyL8BAEslS3IuoG3L4iEFvtsWQFC4 wafpHmsVEfudTtmDYABzSCbhvYiSyWOstxObpOK+v61865yOxHJpAG/VcGz9UhMF AVbOxejATj+3nMDeALAZaMR1CgiISqIO7PUfP1xHgybyUDt6V8NXl29lvfkfrEbU 4LQ2hivHA8LbGiT9WCLno5JrfURlA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrfedtgdduhedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtke ertddtfehhnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecukfhppeejuddrvdduvddruddvledrud elfeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegr ughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from [192.168.1.10] (unknown [71.212.129.193]) by mail.messagingengine.com (Postfix) with ESMTPA id 8BF5F328005A; Sun, 26 Jan 2020 16:20:37 -0500 (EST) Subject: Re: How to transfer databases form one server to other To: Andrus , pgsql-general References: <157139E4A01D436A859FB6612AE6BBD7@dell2> From: Adrian Klaver Message-ID: <1102fee1-eebe-dbe2-63a2-2120380bb2f8@aklaver.com> Date: Sun, 26 Jan 2020 13:20:36 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <157139E4A01D436A859FB6612AE6BBD7@dell2> Content-Type: text/plain; charset=windows-1257; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 1/26/20 8:59 AM, Andrus wrote: > Hi! > > VPS server has old Debian 6 Squeeze with Postgres 9.1 > It has 24 databases. > > Every night backup copies are created using pg_dump to /root/backups > directory for every database. > This directory has 24 .backup files with total size 37 GB. > > I installed new VPS server with Debian 10 and Postgres 12. > > How to transfer those databases to new server ? Before you do any of this I would check the Release Notes for the first release of each major release. Prior to version 10 that would be X.X.x where X is a major release. For 10+ that is X.x. I would also test the upgrade before doing it on your production setup. Best practice if you are going the dump/restore route is to use the pg_dump binary from the new server(12) to dump the old server(9.1) > > Both server have ssh and root user, postgres port 5432  open,  100 MB > internet connection and fixed IP addresses. In night they are not used > by users, can stopped during move. > > Should I download .backup files and use pg_restore or use pipe to > restore whole cluster. > > Andrus. > > -- Adrian Klaver adrian.klaver@aklaver.com