public inbox for [email protected]  
help / color / mirror / Atom feed
pg_upgradecluster version 10 to 16 question
3+ messages / 2 participants
[nested] [flat]

* pg_upgradecluster version 10 to 16 question
@ 2025-06-10 20:01 Jim Cunning <[email protected]>
  2025-06-10 20:14 ` Re: pg_upgradecluster version 10 to 16 question Adrian Klaver <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Jim Cunning @ 2025-06-10 20:01 UTC (permalink / raw)
  To: [email protected]

<!DOCTYPE html>
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    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.<br>
    <br>
    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.<br>
    <br>
    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?<br>
    <br>
    Thanks in advance.<br>
    <br>
  </body>
</html>






^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pg_upgradecluster version 10 to 16 question
  2025-06-10 20:01 pg_upgradecluster version 10 to 16 question Jim Cunning <[email protected]>
@ 2025-06-10 20:14 ` Adrian Klaver <[email protected]>
  2025-06-10 20:17   ` Re: pg_upgradecluster version 10 to 16 question Adrian Klaver <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Adrian Klaver @ 2025-06-10 20:14 UTC (permalink / raw)
  To: Jim Cunning <[email protected]>; [email protected]

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.

> 
> Thanks in advance.
> 

-- 
Adrian Klaver
[email protected]







^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pg_upgradecluster version 10 to 16 question
  2025-06-10 20:01 pg_upgradecluster version 10 to 16 question Jim Cunning <[email protected]>
  2025-06-10 20:14 ` Re: pg_upgradecluster version 10 to 16 question Adrian Klaver <[email protected]>
@ 2025-06-10 20:17   ` Adrian Klaver <[email protected]>
  0 siblings, 0 replies; 3+ messages in thread

From: Adrian Klaver @ 2025-06-10 20:17 UTC (permalink / raw)
  To: Jim Cunning <[email protected]>; [email protected]

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
[email protected]







^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2025-06-10 20:17 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-06-10 20:01 pg_upgradecluster version 10 to 16 question Jim Cunning <[email protected]>
2025-06-10 20:14 ` Adrian Klaver <[email protected]>
2025-06-10 20:17   ` Adrian Klaver <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox