Re: How to move a database from HP server to Linux Server that had already one database.

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "DAYSE ENGEMANN" <dayse(dot)engemann(at)hp(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: How to move a database from HP server to Linux Server that had already one database.
Date: 2010-07-19 16:43:27
Message-ID: 4C443A5F02000025000338E1@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"ENGEMANN, DAYSE" <dayse(dot)engemann(at)hp(dot)com> wrote:

> pg_dump -h sourcemachine -U sourceuser source_dbname | psql
> target_dbname
>
> Is that?

Yes. You need to enter passwords unless they are specified in
.pgpass or you have some form of authorization which doesn't require
typing a password (for example, trust or ident).

> The data will be import in the existing db?

Yes, you should create the target database before issuing this --
you can add a parameter to the dump to cause it to create the
database, but I always feel safer creating it myself and pointing to
an existing database.

-Kevin

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message ENGEMANN, DAYSE 2010-07-19 16:49:41 Re: How to move a database from HP server to Linux Server that had already one database.
Previous Message ENGEMANN, DAYSE 2010-07-19 16:31:18 Re: How to move a database from HP server to Linux Server that had already one database.