Re: Taking hot backup of slave node in postgres (master-slave config with repmgr)

From: Andrey Nikitin <neomerdien(at)gmail(dot)com>
To: Dubravko Sever <Dubravko(dot)Sever(at)srce(dot)hr>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Taking hot backup of slave node in postgres (master-slave config with repmgr)
Date: 2014-01-14 13:34:03
Message-ID: CAJec7P4NTry+8Pqmds6b=TDDE63ocZsTN3mnAOeGG7j49K-gVg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

yes, but i want to take an online snapshot back of the slave, for maximum
up time.
i dont want to bring down my slave machine each time i will be taking a
snapshot (4 times a day).

On Tue, Jan 14, 2014 at 3:25 PM, Dubravko Sever <Dubravko(dot)Sever(at)srce(dot)hr>wrote:

> Hi,
>
>
>
> I don't see any differences if you take backup from master or cold from
> slave, differences are only in conf files.
>
> In my environment I'm only doing full backup using pg_backup of master
> server (it will skip configuration files), create copy of conf. Files and
> that is.
>
>
>
> Of cource do recovery test.
>
>
>
> --
>
> Dubravko Sever
>
> Sektor za računalne sustave
>
> Sveučilište u Zagrebu, Sveučilišni računski centar (Srce),
> www.srce.unizg.hr
>
> Dubravko(dot)Sever(at)srce(dot)hr <Sasa(dot)Drnjevic(at)srce(dot)hr>, tel: +385 1 616 5807,
> fax: +385 1 616 5559
>
>
>
> *From:* pgsql-admin-owner(at)postgresql(dot)org [mailto:
> pgsql-admin-owner(at)postgresql(dot)org] *On Behalf Of *Andrey Nikitin
> *Sent:* Tuesday, January 14, 2014 1:37 PM
> *To:* pgsql-admin(at)postgresql(dot)org
> *Subject:* [ADMIN] Taking hot backup of slave node in postgres
> (master-slave config with repmgr)
>
>
>
> I have a #postgresql setup with master-slave configuration using repmgr.
> im struggling with taking a consistent snapshot backup (pg_start_backup) of
> the slave node, this is due the fact that the slave is in recovery, hence
> read-only mode.
>
> i need both the master and the slave snapshots to speedup the recovery
> process (if taken only on 1 node, in case of recovery the slave needs to be
> rebuild from scratch). any advice of how to take a consistent snapshot of
> slave node? (master is no problem).
>
> currently these are the approaches im checking:
>
> 1.shutting down slave node and take a cold snapshot backup.
>
> 1. pg_start_backup on master and hopefully it will reflect consistent
> state on slave (with the WAL shipping) - any confirmation on this one?
>
> 2. stop replication, take hot backup of slave using regular methods
> and then starting replication again - as far as i tested, not possible
> because as the replication is stopped, each node becomes independent and
> has its own timeline, thus require the nodes to resync in order to function
> again in master-slave config.
>
> 3. make a switch over before taking the backup - dont like this
> option, dont think is a correct approach to make a switch-over each time i
> want to take a backup.
>
> anything i missed? have you implemented it using different methods?
>
> thanks.
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message jaime soler 2014-01-14 14:18:45 Re: GSSAPI auth issue with windows 7 client, postgresql 9.2.3 linux server
Previous Message Dubravko Sever 2014-01-14 13:25:19 Re: Taking hot backup of slave node in postgres (master-slave config with repmgr)