| From: | David Steele <david(at)pgmasters(dot)net> | 
|---|---|
| To: | Deo Felix <deofelix9(at)gmail(dot)com>, pgsql-admin(at)lists(dot)postgresql(dot)org | 
| Subject: | Re: Postgresql Database cant start after restore using pgBackRest | 
| Date: | 2023-06-26 13:08:42 | 
| Message-ID: | 484cbe3c-eb15-5327-df72-3338c17c7855@pgmasters.net | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-admin | 
On 6/25/23 18:53, Deo Felix wrote:
>   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*
Usually this happens when you promote a standby while the primary is 
still running. The promotion of the standby will create a new timeline 
(in this case 2) and then push WAL to the archive on this new timeline.
When you restore, PostgreSQL will try to recover to timeline 2 (by 
default) even though timeline 2 can't be reached from timeline 1 backups 
that were made after the promotion.
So, you need to instruct PostgreSQL to stay on timeline 1 rather than 
try to switch to timeline 2. You can do that by setting 
--target-timeline=current, i.e. stay on the timeline that was current 
when the backup was made.
Regards,
-David
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ron | 2023-06-26 13:55:05 | Re: Postgresql Database cant start after restore using pgBackRest | 
| Previous Message | Deo Felix | 2023-06-25 18:15:46 | Re: Postgresql Database cant start after restore using pgBackRest |