Re: Moving a database

From: "Reshat Sabiq" <sabiq(at)purdue(dot)edu>
To: "'Eft, Aaron'" <Aaron(dot)Eft(at)avnet(dot)com>, "'Kent Rigby'" <kent(dot)rigby(at)att(dot)net>, "'PGSQL Novice List'" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Moving a database
Date: 2002-12-24 22:09:50
Message-ID: 000001c2ab99$31b42230$e282d380@main
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I'm also about to do that and also asked that a while ago (thanks to
everybody who replied then).
>From help, I see suggested syntax of
1) pg_dump -f filename
I guess it does the same as
2) pg_dump > filename

On the destination server, from help I'm seeing syntax like
1) pg_restore -d myDB filename
(to my guess).
That is different from
2) psql dbName < filename
but the result will probably be the same.
Then there is also:
3) psql myDB
\i filename

Is there any difference b/n the 2 dump and the 3 restore ways? If yes.
which of the 2 and 3 ways are preferable?
Thanks,
r.
-----Original Message-----
From: pgsql-novice-owner(at)postgresql(dot)org
[mailto:pgsql-novice-owner(at)postgresql(dot)org] On Behalf Of Eft, Aaron
Sent: Tuesday, December 24, 2002 3:03 PM
To: 'Kent Rigby'; PGSQL Novice List
Subject: Re: [NOVICE] Moving a database

I would suggest doing a

pg_dump > filename

then save that to disk, email it, ftp, whatever to the destination
server, and

createdb databaseName
psql databaseName < filename

-Aaron

-----Original Message-----
From: Kent Rigby [mailto:kent(dot)rigby(at)att(dot)net]
Sent: Tuesday, December 24, 2002 12:54 PM
To: PGSQL Novice List
Subject: [NOVICE] Moving a database
Can someone please tell me the easiest method for moving a database from
one server to another?

Pleaes be explicit, I am in the Novice group for a reason.

Kent

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Reshat Sabiq 2002-12-25 06:51:58 Re: Moving a database-sos
Previous Message Eft, Aaron 2002-12-24 20:02:55 Re: Moving a database