Re: How to clone a running master cluster?

From: Moshe Jacobson <moshe(at)neadwerx(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to clone a running master cluster?
Date: 2013-05-12 12:54:50
Message-ID: CAJ4CxL=UEN_eNALb7hBo8xYKcntLYFE8p73oHKu4FJRjVYDhMA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

That option doesn't seem to exist, but pg_basebackup does seem to be the
way to go.
Thanks for the help, Jeff!

On Sat, May 11, 2013 at 2:15 PM, Jeff Janes <jeff(dot)janes(at)gmail(dot)com> wrote:

> On Sat, May 11, 2013 at 7:56 AM, Moshe Jacobson <moshe(at)neadwerx(dot)com>wrote:
>
>> I have a master database cluster on one server, and it is configured to
>> ship logs via scp to an archive directory on my slave server. The slave
>> server is configured for streaming replication, and also is configured to
>> delete the archived xlogs when they are no longer needed (using
>> pg_archivecleanup).
>>
>> I have a third machine on which I'd like to get another master cluster
>> running, and I'd like it to start with a copy of my current master. I'd
>> cannot restart my master, and would prefer not to restart my slave either.
>>
>> Given my xlog archive configuration, Is there a way to clone my master
>> cluster to another machine, including all of the necessary xlogs, without
>> bringing down the original master or slave?
>>
>
> I'd probably use "pg_basebackup --xlog-method=stream ..."
>
> Or temporarily disable pg_archivecleanup.
>
> Cheers,
>
> Jeff
>

--
Moshe Jacobson
Nead Werx, Inc. | Manager of Systems Engineering
2323 Cumberland Parkway, Suite 201 | Atlanta, GA 30339
moshe(at)neadwerx(dot)com | www.neadwerx.com

"Quality is not an act, it is a habit." -- Aristotle

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Boreham 2013-05-13 01:13:12 Re: Deploying PostgreSQL on CentOS with SSD and Hardware RAID
Previous Message Michael Paquier 2013-05-12 11:33:14 Re: PG Stats Collector