Re: base backup from the standby without pg_basebackup

From: Alexey Klyukin <alexk(at)hintbits(dot)com>
To: Denish Patel <denish(at)omniti(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: base backup from the standby without pg_basebackup
Date: 2015-04-02 15:01:11
Message-ID: CAAS3tyKGoeSxWk0gibsbvnK0DSRwWW2YaWtY5x1nSQkwdKetFw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

On Thu, Apr 2, 2015 at 4:32 PM, Denish Patel <denish(at)omniti(dot)com> wrote:
> Alexey,
>
> Instead of managing it manually, you should be able to take backup from
> slave using OmniPITR:
> https://github.com/omniti-labs/omnipitr/blob/master/doc/omnipitr-backup-slave.pod

Thanks for the suggestion. We don't manage replica creation manually,
we have a tool that is just not designed to get base backups from the
standby, because we never needed it until recently.

Instead of adopting another tool I'd rather understand the process and
implement the necessary changes in the tool of our own.

So far, there are 2 solutions (assuming archiving from the master is
turned on and archives are available to the new replica):

- run pg_start_backup from the master, wait until the replica reaches
the same position as a master during the backup, copy the data files
from the replica, copy the backup label from the master, run
pg_stop_backup and start the new replica.
- rely on pgespresso extension and run
pgespresso_start_backup/pgespresso_stop_backup on the replica (and
grab a backup label in between), and do the rest of the process the
same way like it's done when taking base backups from the master.

And, just for completeness, a set of wonderful tools to help:

- pg_basebackup (once has to turn on full_page_writes on the master beforehand)
- barman
- omnipitr

Thank you,
Alexey.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message John Scalia 2015-04-03 15:59:16 vacuum and table locking
Previous Message Alexey Klyukin 2015-04-02 14:41:54 Re: base backup from the standby without pg_basebackup