Re: Pg_stop_backup process does not run - Backup Intervals

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Pg_stop_backup process does not run - Backup Intervals
Дата
Msg-id CA+TgmoY3RsByiFLoCLa6wkBF3NFGrS9AFaLvfvPHKLupG0VBWg@mail.gmail.com
обсуждение исходный текст
Ответ на Pg_stop_backup process does not run - Backup Intervals  (Rodrigo Cavalcante <rodrigo.java@gmail.com>)
Ответы Re: Pg_stop_backup process does not run - Backup Intervals  (Rodrigo Cavalcante <rodrigo.java@gmail.com>)
Список pgsql-hackers
On Mon, May 2, 2016 at 3:03 PM, Rodrigo Cavalcante
<rodrigo.java@gmail.com> wrote:
> On alternate days my backup is failing, by the pg_stop_backup process ()
> does not perform or quit.
>
> Version PostgreSQL: 9.1.6
>
> The following backup script:
>
> PGDATA=/dados
> SAVE_BASE_DIR=/backup/diario
> backup="'bkpfull'"
> data=$(date +'%d%m%y')
>
> WAL_DIR=/backup/archive
>
> mv $WAL_DIR/* $WAL_DIR/wal_anterior
>
> psql -U postgres -h localhost -c 'select pg_start_backup('$backup',true);'
> template1 && \
>
> tar -czvf $SAVE_BASE_DIR/$data.tar.gz $PGDATA && psql -U postgres -h
> localhost -c 'select pg_stop_backup();' template1

I'm going to refer you to
https://wiki.postgresql.org/wiki/Guide_to_reporting_problems

You aren't being very clear about what actually happens here, and you
haven't mentioned what showed up in the logs, either.  If I had to
guess, I'd guess that if you look at the output of this backup script
on alternate days, you'll find that some step in here is failing on
alternate days, with an error message to tell you which step is
failing and in what way.  That might help you figure out the problem.

Also, consider using one of the various backup toolkits that already
exist instead of writing your own script.  Also, consider using
pg_basebackup.  These tend to be more reliably than home-grown
scripts.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: SET ROLE and reserved roles
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgindent fixups