Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uP5PC-00HVMg-HR for pgsql-general@arkaria.postgresql.org; Tue, 10 Jun 2025 20:17:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uP5PA-0090iy-Lp for pgsql-general@arkaria.postgresql.org; Tue, 10 Jun 2025 20:17:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uP5PA-0090ip-BN for pgsql-general@lists.postgresql.org; Tue, 10 Jun 2025 20:17:08 +0000 Received: from fout-a1-smtp.messagingengine.com ([103.168.172.144]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1uP5P9-001J9n-1G for pgsql-general@lists.postgresql.org; Tue, 10 Jun 2025 20:17:08 +0000 Received: from phl-compute-09.internal (phl-compute-09.phl.internal [10.202.2.49]) by mailfout.phl.internal (Postfix) with ESMTP id 5DDFB13800B5; Tue, 10 Jun 2025 16:17:06 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-09.internal (MEProxy); Tue, 10 Jun 2025 16:17:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1749586626; x=1749673026; bh=9MzvQFcZNDcRkH45plHWCDerdudec+RgkKO42o+ffFY=; b= TZOECRbgqlQZEweFahzcMyvGvTsjEi6MPT/VpB7JLys999NyywocgeOHXWPkf4Tg TPx/ra2SbE3hj+Nd0qsg71AqtGt06ZosNE8qHfmNlET6JfOukhR2cBx+9oe1jDDM zKrN3HkLcMthoeBoAJ1NxkiJpCBJnfF3LZCXqhJTkvwh+QD+3yC3XObXqpUwm6Af CeQ0QYzXiFbqhZ6pdD3UTeCAhkuQIc7T8uJrAz6toHQUTkBPFexhmendnNumrp+G +aRgDGVTKxwz6MSmNn3lRHpZ5nAbPf1Pm26ZFPlJ6OgzizDrsXjEXlnNB8vCU53w 9QSFWe77qYQI1yog9o3oLA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1749586626; x=1749673026; bh=9 MzvQFcZNDcRkH45plHWCDerdudec+RgkKO42o+ffFY=; b=WHxXFyKBfTvX2AQJb 6Iy0NJiv6CgEdG/nkeHnywJhci57esJL0oD38NSgxxQs77XpQ/8GWZ3RKEZXNrWN JV9kCeXrvCsl5xkHUP8EW7VBFIGcN06z7pLHopgo8Nke9LqKDjWnXhlqoUgmN7il szQsHD0T8WdShur8rpPlLiHps7G0hO+5tDAodI5bNSo5M2GF2C5nT437mYW9PjkP xkSvzqm80yeRZGUElBg81El91M8QZhLS0KhD96z+Za8Zq7lJC822DJCEOrqGzvgR 5XAxtnIYf72doVR+1ZJJYXr9g6Ywl/qtUha6jhJ9HO+fEua5OgyrusDB80wKtMpL S/jBA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddugdduuddvudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefkffggfgfuhffvfhgjtgfgsehtkeertddtvdej necuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrh esrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhephfduveeufeevffejieeg heffteetheejveettdfgtdefvdegjefgvedvfefhteffnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghk lhgrvhgvrhdrtghomhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpd hrtghpthhtohepjhhltghunhhnihhnghegieesghhmrghilhdrtghomhdprhgtphhtthho pehpghhsqhhlqdhgvghnvghrrghlsehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 10 Jun 2025 16:17:05 -0400 (EDT) Message-ID: <3183251c-4c06-490b-a0d7-8e2c6d0386e6@aklaver.com> Date: Tue, 10 Jun 2025 13:17:05 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: pg_upgradecluster version 10 to 16 question From: Adrian Klaver To: Jim Cunning , pgsql-general@lists.postgresql.org References: <98182efc-eb12-42f0-8016-01163b5c6fcb@aklaver.com> Content-Language: en-US In-Reply-To: <98182efc-eb12-42f0-8016-01163b5c6fcb@aklaver.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 6/10/25 13:14, Adrian Klaver wrote: > On 6/10/25 13:01, Jim Cunning wrote: >> I had a Ubuntu 20.04 LTS system with a postgresql version 10 database, >> and the system became unbootable.  The database was stored in >> /var/lib/postgresql/10/main and I was able to recover the entire >> contents of the data in that directory and below.  I now have a system >> running ubuntu 24.04 LTS with postgresql version 16. >> >> I obviously no longer have a running version 10 server, so I cannot >> use pg_dump to retrieve the data.  I have placed the recovered version >> files in /var/lib/postgresql/10/main on my new system, alongside the >> /var/lib/postgresql/16/main that was created when I installed >> postgresql.  I have tried several iterations of the pg_upgradecluster >> command, a Python script provided by Ubuntu, but it says it cannot >> find the database files. >> >> I also see from the postgresql wiki pages that there is a pg_upgrade >> utility program, but cannot find in any of the Ubuntu-provided >> installation files.  Can anyone provide some guidance on how I might >> proceed? > > 1) Do: > > man pg_upgradecluster > > 2) Assuming you used the PGDG repos to install Postgres you can do: > > sudo apt install postgresql-10 > > to get a Postgres 10 install. I would move the > /var/lib/postgresql/10/main you created out of the way and then move the > contents back in to the installed version. Forgot to say, be sure and retain a copy of the original 10 $DATADIR somewhere where you can fetch it should the above not work as planned. > >> >> Thanks in advance. >> > -- Adrian Klaver adrian.klaver@aklaver.com