From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Craig James <craig_james@emolecules.com>
To: pgsql-admin@postgresql.org
Subject: Re: How to move a database from HP server to Linux Server that had already one database.
Date: Tue, 10 Aug 2010 12:06:37 -0500
Message-ID: <4C6140CD0200002500034425@gw.wicourts.gov> (raw)
In-Reply-To: <4C617F79.4010002@emolecules.com>
References: <201008100014.o7A0Enb03841@momjian.us>
<4C617F79.4010002@emolecules.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, craig_james@emolecules.com
Subject: Re: How to move a database from HP server to Linux Server that had already one database.
In-Reply-To: <4C6140CD0200002500034425@gw.wicourts.gov>
References: <201008100014.o7A0Enb03841@momjian.us> <4C617F79.4010002@emolecules.com> <4C6140CD0200002500034425@gw.wicourts.gov>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox