Re: Can't import databases with pg_dump. Why?

Lists: pgsql-general
From: "Antonio G(dot) - Geotronix" <antonio(at)sunstone(dot)it>
To: doug(at)mcnaught(dot)org
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Can't import databases with pg_dump. Why?
Date: 2002-11-04 20:32:28
Message-ID: 20021104203227.GA10255@geolandia.home
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general


"Antonio G. - Geotronix" <nightnavigator(at)libero(dot)it> writes:

>> Hi.
>>
>> I'm trying to import some databases I had on redhat 7.2 (think it had
>> postgressql-7.1.x series but not sure) to my new Debian woody
>> installation (postgresql 7.2.1-2woody2). I created a database called
>> 'famiglia' under the postgres user. Then, always by postgres user i
>> did:
>>
>> gaia:/etc/postgresql$ pg_dump famiglia <
>> /mnt/redhat/home/postgres_postgres \
>> /famiglia.dump

>Ummm.... You don't use pg_dump to restore.
>
>-Doug

Hi.

I'm sorry to bother you in private but I'm not recieving the ML posts
for some reason and even though I've written to the ML owner he/she
hasn't still repied for some reason. So I read via web and send via
email client :-)

In your reply you told me that I'm not using pg_dump to restore. But as
you can see in my previus message I am using pg_dump :-)

>> gaia:/etc/postgresql$ pg_dump famiglia <
>> /mnt/redhat/home/postgres_postgres \
>> /famiglia.dump

Bye


From: Doug McNaught <doug(at)mcnaught(dot)org>
To: antonio(at)sunstone(dot)it
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Can't import databases with pg_dump. Why?
Date: 2002-11-04 20:38:39
Message-ID: m3n0op2hps.fsf@varsoon.wireboard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

"Antonio G. - Geotronix" <antonio(at)sunstone(dot)it> writes:

> In your reply you told me that I'm not using pg_dump to restore. But as
> you can see in my previus message I am using pg_dump :-)

Well, it's wrong. ;) I phrased my response badly--I meant "You
shouldn't try to use pg_dump to restore, because it won't work."

Try it like this:

psql famiglia < /mnt/redhat/home/postgres_postgres/famiglia.dump

This assumes your dump is in SQL format, which pg_dump creates by
default. If you used custom or tar format, you need to use
'pg_restore' instead. See the documentation for more info...

-Doug