V
V
Vaskiv992018-12-07 00:07:44
PostgreSQL
Vaskiv99, 2018-12-07 00:07:44

How to properly restore postgres cluster?

FATAL: could not locate required checkpoint record
cp: can't stat '/var/lib/postgresql/cluster/0000000100000022000000FE': No such file or directory
2018-12-06 20:39:33.745 UTC [264] LOG: invalid checkpoint record
2018-12-06 20:39:33.745 UTC [264] FATAL: could not locate required checkpoint record
I want to restore a postgres cluster with pg_basebackup but I get this error. How to fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Melkij, 2018-12-07
@melkij

with pg_basebackup

Important configuration.
There are two options:
- you have a WAL archive, which is written from archive_command/archive_mode. Then you specify restore_command in recovery.conf, which will pull WAL from this configured archive
of yours - you do not have a WAL archive. Then you must call pg_basebackup with -X stream (emnip, this is the default starting from 10, but it's better to specify it explicitly anyway). Or at least with -X fetch - but there are no guarantees in this case.
Without WAL start is impossible.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question