0

I am doing backup with pgbackrest in the database server every day at night, I was testing to restore the backup in another server, the restore was successfully however the database cant start

pgbackrest --stanza=data --delta --log-level-console=detail restore

The restore command is success

Error

Error from log when start the database

I try to to start the database after successfully restore but the database cant start

<2023-06-25 16:07:31.606 EAT::@:[988027]:>LOG:  restored log file "00000002.history" from archive
<2023-06-25 16:07:31.614 EAT::@:[988027]:>LOG:  starting point-in-time recovery to 2023-06-23 01:21:00+03
<2023-06-25 16:07:31.621 EAT::@:[988027]:>LOG:  restored log file "00000002.history" from archive
<2023-06-25 16:07:31.744 EAT::@:[988027]:>LOG:  restored log file "00000001000018340000007D" from archive
<2023-06-25 16:07:31.825 EAT::@:[988027]:>FATAL:  requested timeline 2 is not a child of this server's history
<2023-06-25 16:07:31.825 EAT::@:[988027]:>DETAIL:  Latest checkpoint is at 1835/40F14C88 on timeline 1, but in the history of the requested timeline, the server forked off from that timeline at 103/A6FFFFE0.
zedfoxus
  • 35,121
  • 5
  • 64
  • 63
Deo Felix
  • 1
  • 1
  • Your database was not properly restored, since it is in recovery mode. Without an exact description of what you did, how you restored the server, and how you tried to start PostgreSQL, we can only guess. – Laurenz Albe Jun 26 '23 at 05:55
  • I take backup daily using pgbackrest in the database server with the command pgbackrest --type=full --stanza=data backup I take the backup file and restore in the restoration server. The restore is successful pgbackrest --stanza=data --delta --log-level-console=detail restore Then I start the database /var/lib/postgres/13.3/bin/pg_ctl -D /var/lib/postgres/data -l /var/log/postgres/logfile start I get the error – Deo Felix Jun 26 '23 at 11:51
  • Please [edit] the question and add the information there. as formatted text, not as image. – Laurenz Albe Jun 26 '23 at 12:03

0 Answers0