Re: How to clone a running master cluster? - Mailing list pgsql-general

From Jeff Janes
Subject Re: How to clone a running master cluster?
Date
Msg-id CAMkU=1z=CDJ84+qBwCfn=XyCqK4wCrQfqUSgRVr1pd9kUQu4GQ@mail.gmail.com
Whole thread Raw
In response to How to clone a running master cluster?  (Moshe Jacobson <moshe@neadwerx.com>)
Responses Re: How to clone a running master cluster?  (Moshe Jacobson <moshe@neadwerx.com>)
List pgsql-general
On Sat, May 11, 2013 at 7:56 AM, Moshe Jacobson <moshe@neadwerx.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

pgsql-general by date:

Previous
From: Jeff Janes
Date:
Subject: Re: "Unlogged indexes"
Next
From: Bexley Hall
Date:
Subject: Re: PG in cash till machines