Re: Transfer db from one port to another

From: Killian Driscoll <killiandriscoll(at)gmail(dot)com>
To:
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Transfer db from one port to another
Date: 2015-12-24 08:03:26
Message-ID: CAL64pZNi86AjsJOf9JkT2gyEba0YON-QziuiEvH4RcjkmMOzbA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

<http://ca.linkedin.com/in/killiandriscoll>On 23 December 2015 at 21:37,
Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> wrote:

> On 12/23/2015 12:12 PM, John R Pierce wrote:
>
>> I was half awake early this AM and perused my email, and noted a fubar
>> in one of the command sets shown to you but too sleepy to try and reply
>> at the time, and now this thread is WAY too silly long to find it again,
>> but I think someone neglected to put the database name on a pg_restore
>> command. if you don't give pg_restore a dbname, it just spews the
>> SQL out on the console, which is what it sounded like Killian may have
>> described.
>>
>>
>> yeah, this one from Adrian, at 7:02am PST (Z-0800) this morning....
>>
>> Per previous posts you want, whenever possible, to us a newer version
>>> of pg_dump to move a database from an older version(9.3) to a newer
>>> one(9.4). Therefore you should do your dump and restore using the
>>> pg_dump.exe and pg_restore.exe from the Bitanami bin directory. I
>>> would cd to the above directory and do:
>>>
>>> pg_dump -V
>>> pg_restore -V
>>>
>>> to make sure the programs are found and are the 9.4 versions.
>>>
>>> Then do:
>>>
>>> pg_dump -Fc -p 5432 -U postgres -f irll_project.out irll_project
>>>
>>> pg_restore -U postgres -p 5532 irll_project.out
>>>
>>
>> that last needs to have -d newdbname where newdbname has already
>> been created, for instance, by...
>>
>
> Aah, my mistake. Yes you need to specify the database to get the restore
> to work properly. Also explains why there is nothing in the logs.
>

OK - with the inclusion of stating the dbname the restore works, but not
correctly: what is restored is 24 of 48 tables and 1 of 22 views from one
schema and no tables from the other schema.

A log appeared at 0:08 last night (I'm at GMT +1), which I've attached.
Plus, I did the dump and restore again this morning and have attached the
text from the windows shell if that helps

>
>
>> C:\Bitnami\wappstack-5.5.30-0\postgresql\bin\createdb -p 5532 -U
>> postgres newdbname
>>
>> BEFORE you can restore to it....
>>
>>
>> anyways, this thread has gone on WAY too long, Killian needs to learn
>> the basics of command line operations on MS Windows, which admittedly
>> are rather klunky, but are quite outside the charter of the
>> pgsql-general email list.
>>
>
Yes, I realise this is high end list, and as mentioned above my pay
grade....

>
>>
>>
>>
>> p.s. please don't CC me answers, I get every email sent to the list,
>> with the CC's I end up getting two of every one.\
>>
>
Sorry....

>
> FYI, you can go here:
>
> http://www.postgresql.org/mailpref/pgsql-general
>
> and set eliminatecc to have the listserver do that for you.
>

Thanks

>
>
>>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

Attachment Content-Type Size
cmd_window.txt text/plain 15.6 KB
postgresql-2015-12-23_092357.log application/octet-stream 544.1 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2015-12-24 10:25:16 Re: BDR error while adding 3rd node to cluster
Previous Message Pavel Stehule 2015-12-24 07:56:02 Re: efficient math vector operations on arrays