Hourly backup using pg_basebackup

Поиск
Список
Период
Сортировка
От John Scalia
Тема Hourly backup using pg_basebackup
Дата
Msg-id 54D50D9B.1090905@gmail.com
обсуждение исходный текст
Ответы Re: Hourly backup using pg_basebackup  ("Mathis, Jason" <jmathis@enova.com>)
Re: Hourly backup using pg_basebackup  (Matheus de Oliveira <matioli.matheus@gmail.com>)
Список pgsql-admin
Hi all,

We have a python script called by cron on an hourly basis to back up our production database. Currently, the script
invokespg_dump and takes more than hour to complete. Hence the  
script looks to see if it's already running and exits if so. I want to change the script so it uses pg_basebackup
insteadsince that's so much faster. 

My problem is, however, that while I'd like to just have it build a tarball, maybe compressed,  I can't use a "-X s"
optionfor the wal segments. I think I understand why I can't  
use the streaming option with a "-Ft" specified. I'm just concerned about the docs saying that the backup may have
problemswith fetch as a wal segment may have expired. Manually  
testing is showing that the Db needs about 11 minutes to backup with pg_basebackup, and our wal_keep_segments setting
is6.  This said, an hour's worth of wal segments should be  
available, but the six that were there at the beginning of the backup are not the same six there at the end. I don't
thinkthis is really a problem, but I'd like to get it  
confirmed. Wouldn't the backup actually have to take more than hour for this to be an issue?

Thanks in advance,
Jay


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

Предыдущее
От: Kieren Scott
Дата:
Сообщение: pg_createcluster failing on Trusty
Следующее
От: "Mathis, Jason"
Дата:
Сообщение: Re: Hourly backup using pg_basebackup