pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
OSX: migrating Postgres db from one Mac to another
6+ messages / 4 participants
[nested] [flat]

* OSX: migrating Postgres db from one Mac to another
@ 2021-06-24 13:44  Carlo Poso <carloposo@gmail.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Carlo Poso @ 2021-06-24 13:44 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

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)
   - start pgAdmin
   - 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
following:
[image: Screen Shot 2021-06-24 at 15.25.03.png]


*Carlo*

Attachments:

Screen Shot 2021-06-24 at 15.25.03.png (image/png, 47.2K) download view image
^ permalink raw reply [nested|flat] 6+ messages in thread

* OSX: migrating Postgres db from one Mac to another
@ 2021-06-24 13:53  Carlo Poso <carloposo@gmail.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Carlo Poso @ 2021-06-24 13:53 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

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)
- start pgAdmin
- 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
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?

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

* Re: OSX: migrating Postgres db from one Mac to another
@ 2021-06-24 13:55  Дмитрий Иванов <firstdismay@gmail.com>
  parent: Carlo Poso <carloposo@gmail.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Дмитрий Иванов @ 2021-06-24 13:55 UTC (permalink / raw)
  To: Carlo Poso <carloposo@gmail.com>; +Cc: pgsql-general@lists.postgresql.org

# -*- coding: utf-8 -*-

##########################################################################
#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2021, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#
# config.py - Core application configuration settings
#
##########################################################################
.........
##########################################################################
# Master password is used to encrypt/decrypt saved server passwords
# Applicable for desktop mode only
##########################################################################
MASTER_PASSWORD_REQUIRED = True -> False



чт, 24 июн. 2021 г. в 18:44, Carlo Poso <carloposo@gmail.com>:

> 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)
>    - start pgAdmin
>    - 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
> following:
> [image: Screen Shot 2021-06-24 at 15.25.03.png]
>
>
> *Carlo*
>

Attachments:

Screen Shot 2021-06-24 at 15.25.03.png (image/png, 47.2K) download view image
^ permalink raw reply [nested|flat] 6+ messages in thread

* Re: OSX: migrating Postgres db from one Mac to another
@ 2021-06-24 14:15  Carlo Poso <carloposo@gmail.com>
  parent: Дмитрий Иванов <firstdismay@gmail.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Carlo Poso @ 2021-06-24 14:15 UTC (permalink / raw)
  To: Дмитрий Иванов <firstdismay@gmail.com>; +Cc: pgsql-general@lists.postgresql.org

Thanks.
The message I get after entering the PW is "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?"

*Carlo*


Il giorno gio 24 giu 2021 alle ore 15:55 Дмитрий Иванов <
firstdismay@gmail.com> ha scritto:

> # -*- coding: utf-8 -*-
>
> ##########################################################################
> #
> # pgAdmin 4 - PostgreSQL Tools
> #
> # Copyright (C) 2013 - 2021, The pgAdmin Development Team
> # This software is released under the PostgreSQL Licence
> #
> # config.py - Core application configuration settings
> #
> ##########################################################################
> .........
> ##########################################################################
> # Master password is used to encrypt/decrypt saved server passwords
> # Applicable for desktop mode only
> ##########################################################################
> MASTER_PASSWORD_REQUIRED = True -> False
>
>
>
> чт, 24 июн. 2021 г. в 18:44, Carlo Poso <carloposo@gmail.com>:
>
>> 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)
>>    - start pgAdmin
>>    - 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
>> following:
>> [image: Screen Shot 2021-06-24 at 15.25.03.png]
>>
>>
>> *Carlo*
>>
>

Attachments:

Screen Shot 2021-06-24 at 15.25.03.png (image/png, 47.2K) download view image
^ permalink raw reply [nested|flat] 6+ messages in thread

* Re: OSX: migrating Postgres db from one Mac to another
@ 2021-06-24 14:31  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Carlo Poso <carloposo@gmail.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2021-06-24 14:31 UTC (permalink / raw)
  To: Carlo Poso <carloposo@gmail.com>; +Cc: Дмитрий Иванов <firstdismay@gmail.com>; pgsql-general@lists.postgresql.org

Carlo Poso <carloposo@gmail.com> writes:
> The message I get after entering the PW is "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?"

So the step you missed is "start the Postgres server".  On OSX
that's usually done by setting up a LaunchDaemon script, IIRC
(it's been awhile since I messed with that).

			regards, tom lane





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

* Re: OSX: migrating Postgres db from one Mac to another
@ 2021-06-24 14:32  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Carlo Poso <carloposo@gmail.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Adrian Klaver @ 2021-06-24 14:32 UTC (permalink / raw)
  To: Carlo Poso <carloposo@gmail.com>; pgsql-general@lists.postgresql.org

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.klaver@aklaver.com





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


end of thread, other threads:[~2021-06-24 14:32 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-06-24 13:44 OSX: migrating Postgres db from one Mac to another Carlo Poso <carloposo@gmail.com>
2021-06-24 13:55 ` Дмитрий Иванов <firstdismay@gmail.com>
2021-06-24 14:15   ` Carlo Poso <carloposo@gmail.com>
2021-06-24 14:31     ` Tom Lane <tgl@sss.pgh.pa.us>
2021-06-24 13:53 OSX: migrating Postgres db from one Mac to another Carlo Poso <carloposo@gmail.com>
2021-06-24 14:32 ` Adrian Klaver <adrian.klaver@aklaver.com>

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