Re: Transfer db from one port to another

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: Transfer db from one port to another
Дата
Msg-id 567A7247.8020205@hogranch.com
обсуждение исходный текст
Ответ на Re: Transfer db from one port to another  (Killian Driscoll <killiandriscoll@gmail.com>)
Ответы Re: Transfer db from one port to another  (Killian Driscoll <killiandriscoll@gmail.com>)
Список pgsql-general
On 12/23/2015 1:40 AM, Killian Driscoll wrote:
Try it with plain pg_dump.

pg_dump -h localhost -p 5432 -Fc <dbname> > dump.sql

pg_restore -h localhost -p 5532 dump.sql

I tried this, but nothing appears to happen when entering the commands. Attached is a screenshot of the shell window - what am I doing wrong?


those are system shell commands, not psql sql commands.      catch-22, in the windows environment, postgresql's command tools probably aren't in the path, so to execute the above commands try this...

    start -> run ->  CMD <enter>

(or, click on an 'Command Prompt' shortcut).

    C:\Users\YourName> path "c:\Program Files\PostgreSQL\9.4\bin";%path%
    C:\Users\YourName> pg_dump -Fc -p 5432 <dbname> | pg_restore -p 5532

if your postgres is installed somewhere else, replace "c:\Program Files\PostgreSQL\9.4\bin" in the PATH command with its actual location \bin  ....





-- 
john r pierce, recycling bits in santa cruz

В списке pgsql-general по дате отправления:

Предыдущее
От: "Charles Clavadetscher"
Дата:
Сообщение: Re: Transfer db from one port to another
Следующее
От: Killian Driscoll
Дата:
Сообщение: Re: Transfer db from one port to another