Comments on How To Easily Migrate A PostgreSQL Server With Minimal Downtime

How To Easily Migrate A PostgreSQL Server With Minimal Downtime PostgreSQL is a great database server, but when your dataset is rather large, migrating a server by using pg_dump can be a rather long process. In this tutorial we will discuss a way to migrate a entire server with as little downtime as possible. To achieve this, we will be using the PostgreSQL built in features for PITR (Point in time recovery).

5 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Grant

One more thing:

In order to make the down time even shorter, remember that rsync will not copy files it already has, so, it is very reasonable to do the rsync before you shut down the original server, even several times if needed, until it is only working on the one, newest file.   Then shut down the DB, one more rsync, which will grab just that last file, which is much quicker, then bring up the remote machine.

By: Anonymous

There was an announcement in postgresql-announce about ChronicDB that can apply updates immediately without downtime. The are doing live connection migration so you don't even need to shutdown the application.

By: jpenny

Another option is bucardo.

 http://bucardo.org/wiki/Bucardo

 It is a replication server, but once the replication is complete, the master could be turned off.

By: spybubble review

The are doing live connection migration so you don't even need to shutdown the application.

By: Chris Bell

I'm guessing

archive_command = 'cp -i %p /archive%f

 should be

archive_command = 'cp -i %p /archive/%f'