1

Is it possible to restore a full backup from pgbackrest without the archive files?

I tried to restore a full backup on another server but when I tried to start the instance via pg_ctl start I get an error saying "panic: could not locate a valid checkpoint"

If it is not possible then would it be possible to restore a pgbackrest backup over ssh?

PgBackrest - Version: 2.24

PostgreSQL - Version: 9.6

pgbackrest --stanza=mystanza restore --process-max 4  --delta --link-all

1 Answer 1

3

There is no way to restore from a postgresql binary backup without WAL. Regardless of the backup software was used: pg_basebackup, pgbackrest, barman, wal-e, wal-g or something else that uses a binary copy of the data directory. Even if case when a postgresql server was completely shut down while the backup was taken. It is mandatory to have WAL segments to start the database system.


So, if you have no backup (correct, a basebackup without WAL means no backup) and you want to start the database and damage your data - you could try to use pg_resetwal. Please read the docs carefully. After that, any anomalies in the data are expected, for example, you may find duplicate rows under a unique constraint, see rows that have already been deleted, or cannot find recently added rows.

3
  • Hello, thank you for your reply. No I don't want to use the pg_resetwal. Is it possible to restore a pgbackrest backup over ssh? Nov 12, 2021 at 13:24
  • No. You cannot restore a physical backup without WAL archives. Nov 12, 2021 at 15:12
  • Okay I understand that but is it generally possible with pgbackrest to restore backups over ssh ? Nov 12, 2021 at 20:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.