I use the barman for backup and restore
after some restore , we start the postgresql as the following
systemctl start postgresql.service
but postgresql not startup
from the log:
/var/lib/pgsql/backups/data/pg_log
we seen the following errors
LOG: database system was interrupted; last known up at 2017-08-06 07:30:49 UTC
LOG: restored log file "00000008.history" from archive
LOG: starting point-in-time recovery to 2017-08-06 07:30:49.813508+00
LOG: restored log file "0000000800000000000000C1" from archive
LOG: redo starts at 0/C1000080
LOG: recovery stopping before commit of transaction 96139, time 2017-08-06 07:30:49.855629+00
LOG: redo done at 0/C1001B90
FATAL: requested recovery stop point is before consistent recovery point
LOG: startup process (PID 55858) exited with exit code 1
LOG: terminating any other active server processes
please advice what is wrong configuration on BARMAN that cause this ?
Best Answer
It looks to me like you are trying to restore to a point in time that is earlier than what is recorded in the backups.
Make sure you have not specified a recovery-time that is earlier than the backup you are trying to restore.
Check the files
recovery.conf
andbackup.label
in the postgres data directory. If you want to restore to the latest possible, then you should make sure you don't have a property namedrecovery_target_time
in the recovery.conf.