PostgreSQL backup issue

From: Jayadevan M <maymala(dot)jayadevan(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: PostgreSQL backup issue
Date: 2018-05-23 05:15:26
Message-ID: CAFS1N4i5AUf6U46BcAvt1kA1n3T15kSBVrT86jMGCBYFWv=W7w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello all,

I have a PostgreSQL backup script which executes daily. The backup creates
no output on "some" days - no pattern observed yet. There is no space
issue.
Here are the relevant lines from the shell script.

mkdir $bdir
echo "Backup began at " `date` | tee -a $logfile
pg_basebackup --checkpoint=fast --xlog-method=fetch -v -P -h xx.xxx.xx.xx
-U replication -R -D $bdir | tee -a $logfile
echo "Backup completed at " `date` | tee -a $logfile

The directory $bdir does get created. But it remains empty. The echo before
and after the backup is writing to $logfile.
Everything that happens on the database gets logged in PGLOG file. Even the
connection request by replication user is not there in PGLOG file on the
days when the backup doesn't work. Best way to trouble-shoot this? Also,
the output from pg_basebackup does not get logged in $logfile even on those
days when the backup works fine. How can I get the output into the logfile?

Regards,
Jayadevan

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2018-05-23 05:35:46 Re: PostgreSQL backup issue
Previous Message Berend Tober 2018-05-23 03:14:20 Per-document document statistics