HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Is it possible to migrate a postgresql database without downtime?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
postgresqlwithoutdowntimemigratedatabasepossible

Problem

I have a Postgresql Database on my Centos, I use barman to backup my database, my question is that is it possible to migrate my database to another server without downtime?
I know some solutions with small downtime with pg_start_backup(), barman also can handle it, but is there anyway to do it without down time?
And one more question is, what is the best way to migrate it?

Solution

If you need to migrate to the same version of postgres, then you can setup slave of your db on new server with streaming replication and then just promote it to master. There will be no downtime while doing pg_basebackup, maybe just some load on disks and network caused by your whole cluster moving to new server.

Context

StackExchange Database Administrators Q#144751, answer score: 7

Revisions (0)

No revisions yet.