Re: pg_basebackup exit codes
От | Magnus Hagander |
---|---|
Тема | Re: pg_basebackup exit codes |
Дата | |
Msg-id | CABUevEwauKzS-tb_ho-wcjWRq2iW5K=Z_=2C4C--aXMEioj8Qw@mail.gmail.com обсуждение исходный текст |
Ответ на | pg_basebackup exit codes (John Donath <John.Donath@detron.nl>) |
Ответы |
RE: pg_basebackup exit codes
|
Список | pgsql-general |
Hi,
I was unpleasantly surprised to see that pg_basebackup will return a zero (Success) exit code even when it has actually failed like below:
pg_basebackup: could not write to compressed file "/var/lib/pgsql/10/inst1/backup/cust-pg02_inst1_Fri_20190816/base.tar.gz": No space left on device
pg_basebackup: removing data directory "/var/lib/pgsql/10/inst1/backup/cust-pg02_inst1_Fri_20190816"
A reliable exit code is of great importance in backup scripts using a statement like below:
pg_basebackup -D ${backup_dest} -Ft -z 2>&1 | tee -a ${log_file}; rv=$?
[ $rv -eq 0 ] || error "pg_basebackup failed with rcode $rv; also see ${log_file}"
Pg_basebackup version: (PostgreSQL) 10.10
Anybody else encountering this problem?
В списке pgsql-general по дате отправления: