Re: OSX: migrating Postgres db from one Mac to another

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Carlo Poso <carloposo(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: OSX: migrating Postgres db from one Mac to another
Date: 2021-06-24 14:32:22
Message-ID: 8bb872e8-bc87-5b07-ed18-14a0e604b358@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 6/24/21 6:53 AM, Carlo Poso wrote:
> Hello,
> my Mac unfortunately crashed. I have a Time Machine backup.
> Using the Migration Assistant on a new Mac allowed me to get all my
> documents back, but unfortunately Postgres is not able to start.
>
> So I was trying to manually set-up my Postgres db.
>
> Here are the steps:
>
> - install a fresh copy of Postgres (v11)
> - replace the /Library/PostgreSQL/11/data folder with the one I dig out
> from my dead Mac, where I assume my data is stored
> - check/fix owner of folders (must be 'postgres', I assume)

You have not started the server.

> - start pgAdmin

pgAdmin != Postgres

pgAdmin is just a client, the server needs to be started in order for it
to connected.

> - enter the PW for postgres user
> - click on "PostgreSQL 11" server to show databases
>
> This is where I have problems. I am prompted with the same pop-up asking me
> to enter the password for the user 'postgres'. I type it and I get the

The message is telling you what the problem is, the server is not
running, or if it where running not listening on port 5432.

> message "could not connect to server: Connection refused Is the server
> running on host "localhost" (::1) and accepting TCP/IP connections on
> port 5432? could not connect to server: Connection refused Is the server
> running on host "localhost" (127.0.0.1) and accepting TCP/IP connections
> on port 5432?
>
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter J. Holzer 2021-06-24 15:42:27 Re: Psql wants to use IP6 when connecting to self using tcp...
Previous Message Tom Lane 2021-06-24 14:31:50 Re: OSX: migrating Postgres db from one Mac to another