Re: Backups over slave instead master?

From: Edson Richter <edsonrichter(at)hotmail(dot)com>
To: bricklen <bricklen(at)gmail(dot)com>, Shaun Thomas <sthomas(at)optionshouse(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Backups over slave instead master?
Date: 2014-05-02 14:46:16
Message-ID: BLU436-SMTP498F2330B87C04F97F394ECF430@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Em 01/05/2014 16:39, bricklen escreveu:
>
> On Thu, May 1, 2014 at 8:54 AM, Shaun Thomas <sthomas(at)optionshouse(dot)com
> <mailto:sthomas(at)optionshouse(dot)com>> wrote:
>
> On 05/01/2014 10:31 AM, Edson Richter wrote:
>
> I'm wondering if would be possible to execute these backups in
> the slave
> server instead, so I can avoid the overhead of backups on
> master system?
>
>
> If you're on PostgreSQL 9.3, you can backup the slave server
> safely. If not, you'll need to run this command on the master
> system first:
>
> SELECT pg_start_backup('some-label');
>
> After the backup is done, run this on the master server:
>
> SELECT pg_stop_backup();
>
>
> Or alternatively, if "backup" = pg_dump, then backups can taken from
> the slave too. Have a look at pg_xlog_replay_pause() + pg_dump +
> pg_xlog_replay_resume().
> http://www.postgresql.org/docs/current/static/functions-admin.html#FUNCTIONS-RECOVERY-CONTROL-TABLE
Yes, backup = pg_dump.
Can I use it on slave even on 9.2.7?

Edson

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shaun Thomas 2014-05-02 14:49:07 Re: Backups over slave instead master?
Previous Message Francisco Olarte 2014-05-02 08:14:06 Re: break table into portions for writing to separate files