Re: How to move a database from HP server to Linux Server that had already one database. - Mailing list pgsql-admin

From Kevin Grittner
Subject Re: How to move a database from HP server to Linux Server that had already one database.
Date
Msg-id 4C6140CD0200002500034425@gw.wicourts.gov
Whole thread Raw
In response to Re: How to move a database from HP server to Linux Server that had already one database.  (Craig James <craig_james@emolecules.com>)
List pgsql-admin
Craig James <craig_james@emolecules.com> wrote:

> If you have a slow network, then run pg_dump on the machine where
> the database lives and use compression (--format=c) and restore
> using pg_restore.  It will cut WAY down on the amount of data that
> has to move across the net.

If you don't mind dancing around a bit you can ssh from the target
to the source, run pg_dump piped to gzip there, gunzip the stream on
the target side, and still pipe it into psql without having to go
through the disk write/read cycle that --format=c requires.  Because
of the pain of getting all the quoting right when trying that as a
one-line bash command, I generally create a short script on the
source to do the dump and gzip.  The only other pain point is the
remote password.  .pgpass solves that.

-Kevin

pgsql-admin by date:

Previous
From: Craig James
Date:
Subject: Re: How to move a database from HP server to Linux Server that had already one database.
Next
From: Gaurav Singh
Date:
Subject: psql - password authentication failed for user "singh09721"