From: Brian Hirt <bhirt@me.com>
To: EDH <evandhoffman@gmail.com>
Cc: Postgresql Mailing List <pgsql-general@postgresql.org>
Subject: Re: Copying data files to new hardware?
Date: Wed, 13 Oct 2010 10:49:53 -0600
Message-ID: <F55203CF-D9A5-4AEB-BAC4-511767133926@me.com> (raw)
In-Reply-To: <7dc101b1-6596-4850-b0ce-cb3f01f51f14@n40g2000vbb.googlegroups.com>
References: <7dc101b1-6596-4850-b0ce-cb3f01f51f14@n40g2000vbb.googlegroups.com>
Evan,
Others can probably answer your question better about copying, but in general we never do that but I think if you use the same arch and major release of postgresql you will be okay.
We have used Slony successfully for all of our database upgrades, server maintenance and database moves over the last several years. Slony 1.2 still supports postgres 8.2. You can set up the new database on the new machine, set it up as a slave and the current machine as a master, replicate the entire database, wait for replication to catch up do a switchover and shut down the old master and uninstall slony. The plus is that you can accomplish what you need with pretty much 0 downtime.
--brian
On Oct 13, 2010, at 10:03 AM, EDH wrote:
> I have a large Postgres DB (1100 GB) that I'd like to move to a new
> physical machine. In the past I've done this via pg_dump & restore,
> but the DB was much smaller then, and I'm concerned about how long
> that would take. The version of pg currently in use is:
>
> PostgreSQL 8.2.5 on x86_64-redhat-linux-gnu, compiled by GCC gcc (GCC)
> 4.1.1 20070105 (Red Hat 4.1.1-52)
>
> What I'd like to know is: if I install the latest 8.2.x release - I
> see 8.2.18 RPMs are available - can I do a straight copy of the
> contents of /var/lib/pgsql/data/ to the new server and start it up?
> Or is dump & restore the only real way to do this?
>
> If I have to do a dump & restore I figure I may as well take the
> opportunity to migrate to 8.4 or 9.0, but I'd rather just get
> everything done as quickly as possible.
>
> Thanks,
> Evan
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
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: bhirt@me.com, evandhoffman@gmail.com, pgsql-general@postgresql.org
Subject: Re: Copying data files to new hardware?
In-Reply-To: <F55203CF-D9A5-4AEB-BAC4-511767133926@me.com>
References: <7dc101b1-6596-4850-b0ce-cb3f01f51f14@n40g2000vbb.googlegroups.com> <F55203CF-D9A5-4AEB-BAC4-511767133926@me.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