On Saturday, November 26, 2011 10:18:56 AM Carlos Henrique Reimer wrote:
> Hi,
>
> We're planning to move our postgreSQL database from one CPU box to another
> box.
>
> I'm considering an alternative procedure for the move as the standard one
> (pg_dump from the old, copy dump to the new box, psql to restore in the
> new) will take about 10 hours to complete. The ideia is installing the same
> Linux and PostgreSQL versions in the new box and copy the entire database
> cluster directory from the old to the new one using the scp Linux command.
>
> Checked the locale files and they were not customized and are the same in
> the same box.
>
> Which risks am I exposed in this approach?
This will work, if the versions are the same and the source database is
stopped before you start the copy. Make sure you fix up the permissions
afterwards.
It would be faster to use rsync - you can run a first pass with the source
database running, then stop it and run a last rsync -ar --delete to pick up
any changes. Your only downtime need be during the last pass.
Make sure you've copied over any sysctl.conf settings.