pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: 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 09:34:01 -0700
Message-ID: <4C617F79.4010002@emolecules.com> (raw)
In-Reply-To: <201008100014.o7A0Enb03841@momjian.us>
References: <201008100014.o7A0Enb03841@momjian.us>

On 8/9/10 5:14 PM, Bruce Momjian wrote:
> ENGEMANN, DAYSE wrote:
>> Hi Kevin,
>> Sorry to disturb you.. But I am really new in it...
>> Let me see if I understood...
>>
>>   pg_dump -h sourcemachine -U sourceuser source_dbname | psql target_dbname
>
> Has anyone done any measurement of whether it is faster to do the dump
> on the local machine with psql remote or from a remote machine (where
> psql would be local)?

It probably depends more on your network speed.  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 have a fast network, then it doesn't matter very much -- you'll be limited by disk speed.

Craig



view thread (16+ messages)  latest in thread

Message-ID: <4C617F79.4010002@emolecules.com>
Permalink:  ../4C617F79.4010002@emolecules.com/
Also on:    postgresql.org/message-id/4C617F79.4010002@emolecules.com

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: 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: <4C617F79.4010002@emolecules.com>

* 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