Thread: Moving Postgresql 9.1 instance from FreeBSD 9.0 machine to FreeBSD 10.2

Moving Postgresql 9.1 instance from FreeBSD 9.0 machine to FreeBSD 10.2

From
Amitabh Kant
Date:
Hi

I have a Postgresql 9.1 instance running on FreeBSD 9.0 (64 bit). The machine is now running out of space and no extra hard disk can be added to the machine. I am planning to move the instance to another machine which is running FreeBSD 10.2 (64 bit) with the same Postgresql version.

One idea is to take a dump and transfer the data, which is my fallback plan. The other is to simply copy over the data directory since the postgresql version is same (64 bit OS with PG 9.1) on both machine. This will reduce a lot of down time as the data is around 1 TB .

Old Machine: FreeBSD 9.0 (64 bit) with Postgresql 9.1 (UFS file system)

New Machine: FreeBSD 10.2 (64 bit) with Postgresql 9.1 (UFS file system)

The directory structure and others hardware would remain the same in both machine, apart from a increased capacity of hard disk and RAM in the new machine.

Just wondering if anybody has already done such a move or has any suggestions if I should or should not go the directory copy route?


Thanks

Amitabh

Re: Moving Postgresql 9.1 instance from FreeBSD 9.0 machine to FreeBSD 10.2

From
Andreas Kretschmer
Date:
Read the doc about Replikation. I think you can simply set up the New machine AS streaming Replikation slave and promote it than AS master - with no downtime.

Am 20. Dezember 2015 02:50:57 MEZ, schrieb Amitabh Kant <amitabhkant@gmail.com>:
Hi

I have a Postgresql 9.1 instance running on FreeBSD 9.0 (64 bit). The machine is now running out of space and no extra hard disk can be added to the machine. I am planning to move the instance to another machine which is running FreeBSD 10.2 (64 bit) with the same Postgresql version.

One idea is to take a dump and transfer the data, which is my fallback plan. The other is to simply copy over the data directory since the postgresql version is same (64 bit OS with PG 9.1) on both machine. This will reduce a lot of down time as the data is around 1 TB .

Old Machine: FreeBSD 9.0 (64 bit) with Postgresql 9.1 (UFS file system)

New Machine: FreeBSD 10.2 (64 bit) with Postgresql 9.1 (UFS file system)

The directory structure and others hardware would remain the same in both machine, apart from a increased capacity of hard disk and RAM in the new machine.

Just wondering if anybody has already done such a move or has any suggestions if I should or should not go the directory copy route?


Thanks

Amitabh

--
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

Re: Moving Postgresql 9.1 instance from FreeBSD 9.0 machine to FreeBSD 10.2

From
Amitabh Kant
Date:
Thanks Andreas .. I thought of going the replication way .. But having done a sample run couple of hours ago, it seems it will work out without making any changes . Will update this thread once I have done the final run .

Amitabh

On Sunday 20 December 2015, Andreas Kretschmer <andreas@a-kretschmer.de> wrote:
Read the doc about Replikation. I think you can simply set up the New machine AS streaming Replikation slave and promote it than AS master - with no downtime.

Am 20. Dezember 2015 02:50:57 MEZ, schrieb Amitabh Kant <amitabhkant@gmail.com>:
Hi

I have a Postgresql 9.1 instance running on FreeBSD 9.0 (64 bit). The machine is now running out of space and no extra hard disk can be added to the machine. I am planning to move the instance to another machine which is running FreeBSD 10.2 (64 bit) with the same Postgresql version.

One idea is to take a dump and transfer the data, which is my fallback plan. The other is to simply copy over the data directory since the postgresql version is same (64 bit OS with PG 9.1) on both machine. This will reduce a lot of down time as the data is around 1 TB .

Old Machine: FreeBSD 9.0 (64 bit) with Postgresql 9.1 (UFS file system)

New Machine: FreeBSD 10.2 (64 bit) with Postgresql 9.1 (UFS file system)

The directory structure and others hardware would remain the same in both machine, apart from a increased capacity of hard disk and RAM in the new machine.

Just wondering if anybody has already done such a move or has any suggestions if I should or should not go the directory copy route?


Thanks

Amitabh

--
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

Re: Moving Postgresql 9.1 instance from FreeBSD 9.0 machine to FreeBSD 10.2

From
Amitabh Kant
Date:

On Sun, Dec 20, 2015 at 6:22 PM, Amitabh Kant <amitabhkant@gmail.com> wrote:
Thanks Andreas .. I thought of going the replication way .. But having done a sample run couple of hours ago, it seems it will work out without making any changes . Will update this thread once I have done the final run .

Amitabh


On Sunday 20 December 2015, Andreas Kretschmer <andreas@a-kretschmer.de> wrote:
Read the doc about Replikation. I think you can simply set up the New machine AS streaming Replikation slave and promote it than AS master - with no downtime.

Am 20. Dezember 2015 02:50:57 MEZ, schrieb Amitabh Kant <amitabhkant@gmail.com>:
Hi

I have a Postgresql 9.1 instance running on FreeBSD 9.0 (64 bit). The machine is now running out of space and no extra hard disk can be added to the machine. I am planning to move the instance to another machine which is running FreeBSD 10.2 (64 bit) with the same Postgresql version.

One idea is to take a dump and transfer the data, which is my fallback plan. The other is to simply copy over the data directory since the postgresql version is same (64 bit OS with PG 9.1) on both machine. This will reduce a lot of down time as the data is around 1 TB .

Old Machine: FreeBSD 9.0 (64 bit) with Postgresql 9.1 (UFS file system)

New Machine: FreeBSD 10.2 (64 bit) with Postgresql 9.1 (UFS file system)

The directory structure and others hardware would remain the same in both machine, apart from a increased capacity of hard disk and RAM in the new machine.

Just wondering if anybody has already done such a move or has any suggestions if I should or should not go the directory copy route?


Thanks

Amitabh

--
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.


Just did a transfer without a hitch on a 1 TB (approx) production database . Everything is working fine. Saved a ton of time and complications.

Amitabh

On 12/20/15 3:43 PM, Amitabh Kant wrote:
> Just did a transfer without a hitch on a 1 TB (approx) production
> database . Everything is working fine. Saved a ton of time and
> complications.

Note that that would not work if there were any binary incompatibilities
between the two systems. Something like big vs little endian would be an
obvious example. Postgres would detect all the obvious examples of this
and refuse to start. One thing I'm not sure about is if there were
different locals installed on the two machines.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com