Re: Backups over slave instead master?

Поиск
Список
Период
Сортировка
От bricklen
Тема Re: Backups over slave instead master?
Дата
Msg-id CAGrpgQ9KmwZkbhxnoNYmEP7tQNGYw1b1ioSGsosQr04PYi3kDg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Backups over slave instead master?  (Shaun Thomas <sthomas@optionshouse.com>)
Ответы Re: Backups over slave instead master?
Re: Backups over slave instead master?
Список pgsql-general

On Thu, May 1, 2014 at 8:54 AM, Shaun Thomas <sthomas@optionshouse.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

В списке pgsql-general по дате отправления:

Предыдущее
От: Raymond O'Donnell
Дата:
Сообщение: Re: Ubuntu Packages / Config Files
Следующее
От: Stephan Fabel
Дата:
Сообщение: Re: Ubuntu Packages / Config Files