Re: Moving a database

From: Jeff Frost <jeff(at)frostconsultingllc(dot)com>
To: Richard Bortolucci <richardbortolucci(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Moving a database
Date: 2005-12-17 03:39:22
Message-ID: Pine.LNX.4.64.0512161936380.28807@discord.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

If they are both up and running and reachable, then you likely just want to do
something as simple as:

pg_dumpall -h <old host> | psql -h <new host> template1

That's assuming you want to move all the DBs on the first server to the
second.

NOTE: pg_dumpall cannot dump large objects. If you have these, you'll have to
use another method of migration.

Another good method if you want to limit downtime and have primary keys on
all your tables is to setup slony on both nodes, let the subscription get up
to date and then change roles and bring down the old server.

On Wed, 14 Dec 2005, Richard Bortolucci wrote:

> Hi,
>
> What are the correct steps to move an database and from an server running
> postgreslq 7.4.2 to another running 8.0.3?
>
> --
> Richard Bortolucci
>

--
Jeff Frost, Owner <jeff(at)frostconsultingllc(dot)com>
Frost Consulting, LLC http://www.frostconsultingllc.com/
Phone: 650-780-7908 FAX: 650-649-1954

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Christopher Browne 2005-12-17 04:09:14 Re: Moving a database
Previous Message Jeff Frost 2005-12-17 03:34:43 Re: How to find data directory