Re: Transfer db from one port to another

From: Killian Driscoll <killiandriscoll(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: John R Pierce <pierce(at)hogranch(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Transfer db from one port to another
Date: 2015-12-23 14:50:13
Message-ID: CAL64pZNG4i-PcE6_QNQn5OvPEj4RZ7dMYdik3Y04M4=RtqHZ=A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 23 December 2015 at 15:47, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:

> On 12/23/2015 06:35 AM, Killian Driscoll wrote:
>
>> On 23 December 2015 at 15:30, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com
>> <mailto:adrian(dot)klaver(at)aklaver(dot)com>> wrote:
>>
>> On 12/23/2015 06:13 AM, Killian Driscoll wrote:
>>
>> On 23 December 2015 at 14:56, Adrian Klaver
>> <adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>
>> <mailto:adrian(dot)klaver(at)aklaver(dot)com
>>
>> <mailto:adrian(dot)klaver(at)aklaver(dot)com>>> wrote:
>>
>> On 12/23/2015 03:43 AM, Killian Driscoll wrote:
>>
>> On 23 December 2015 at 11:36, John R Pierce
>> <pierce(at)hogranch(dot)com <mailto:pierce(at)hogranch(dot)com>
>> <mailto:pierce(at)hogranch(dot)com <mailto:pierce(at)hogranch(dot)com
>> >>
>> <mailto:pierce(at)hogranch(dot)com
>> <mailto:pierce(at)hogranch(dot)com> <mailto:pierce(at)hogranch(dot)com
>> <mailto:pierce(at)hogranch(dot)com>>>> wrote:
>>
>> On 12/23/2015 2:25 AM, Killian Driscoll wrote:
>>
>> Sorry, forgot to add: once I get the warning
>> that the
>> Pg_dump
>> can't be found there is then a password
>> prompt; I tried
>> the db
>> password and the pc password but both fail:
>>
>> Password:
>> pg_dump: [archiver (db)] connection to database
>> "irll_project"
>> failed: FATAL: p
>> assword authentication failed for user "killian"
>>
>>
>> note that databases don't have passwords, database
>> USERS have
>> passwords. 'killian' probably doesn't have a
>> database
>> user, and
>> since you didn't specify a user, it defaulted to
>> your system
>> username (expecting that user to have been created
>> in
>> postgres, and
>> wanting that probably non-existant postgres users
>> passsword)
>>
>> so, ok, try the command with -U postgres, as *
>> *
>>
>> *pg_dump -Fc -p 5432 **-U postgres
>> **irll_project |
>> pg_restore
>> -U postgres -p 5532*
>>
>> OK - I did the dir and it shows that the dump and
>> restore.exe
>> are there,
>> but running the above gives the below errors
>>
>> 09/06/2014 08:35 381,952 pg_dump.exe
>>
>> 09/06/2014 08:35 180,224 pg_restore.exe
>>
>> C:\Users\killian>path "C:\Program
>> Files\PostgreSQL\9.3\bin";%path%
>>
>> C:\Users\killian>pg_dump -Fc -p 5432 -U postgres
>> irll_project |
>> pg_restore -U po
>> stgres -p 5532
>> ccoulould not findd a n "pg_restore" to executeot find a
>> "pg_dump" to
>> execute
>>
>> pg_restore: [archiver] did not find magic string in
>> file header
>> pg_dump: [custom archiver] could not write to output
>> file:
>> Invalid argument
>>
>>
>>
>> Try breaking the above down into two steps:
>>
>> pg_dump -Fc -p 5432 -U postgres -f irll_project.out
>> irll_project
>>
>>
>> Doing this step I get response
>> could not find a "pg_dump" to execute
>>
>>
>> So cd into:
>>
>> C:\Program Files\PostgreSQL\9.3\bin
>>
>> and try:
>>
>> pg_dump --help
>>
>> that will at least establish that the command is being found.
>>
>>
>> OK - --help on the 9.3 lists help options
>>
>
> In your original post you said you have a 9.3 instance and a 9.4 instance.
>
> From your post I would say the 9.3 instance was installed by the one click
> installer from EDB and the 9.4 from Bitami, is that correct?
>
Correct.

>
> So do you know where the 9.4 binaries are installed?
>
If by binaries, you mean the program files they are installed
C:\Bitnami\wappstack-5.5.30-0\postgresql\bin

>
>
>>
>>
>>
>> pg_restore -U postgres -p 5532 irll_project.out
>>
>>
>>
>>
>> if/when it prompts for a password, thats the
>> password of the
>> 'postgres' database user, as configured in the
>> postgres
>> servers.
>>
>> note it will prompt for the password a couple
>> times, once for
>> postgres on port 5432, and again for postgres on
>> port 5532,
>> at least
>> if both database services are configured to require
>> passwords for
>> local connections.
>>
>>
>> --
>> john r pierce, recycling bits in santa cruz
>>
>>
>>
>>
>> --
>> Adrian Klaver
>> adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>
>> <mailto:adrian(dot)klaver(at)aklaver(dot)com
>> <mailto:adrian(dot)klaver(at)aklaver(dot)com>>
>>
>>
>>
>>
>> --
>> Adrian Klaver
>> adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>
>>
>>
>>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2015-12-23 15:02:48 Re: Transfer db from one port to another
Previous Message Alexander Franca Fernandes 2015-12-23 14:49:54 Huge delay to finish even having all the records inserted