Re: Postgresql Database cant start after restore using pgBackRest

Поиск
Список
Период
Сортировка
От Deo Felix
Тема Re: Postgresql Database cant start after restore using pgBackRest
Дата
Msg-id CALW=F4PgGSJX-ix0NgbD4XFCezt5ZNTDvTLvJUG0yR89z08tog@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Postgresql Database cant start after restore using pgBackRest  (Ron <ronljohnsonjr@gmail.com>)
Ответы Re: Postgresql Database cant start after restore using pgBackRest  (David Steele <david@pgmasters.net>)
Список pgsql-admin
In the postgresql.auto.conf i have this configs
restore_command = 'pgbackrest --pg1-path=/var/lib/postgres/main --stanza=data archive-get %f "%p"'
recovery_target = 'immediate'
recovery_target_timeline = 'current'

But still I the database cant start


image.png

On Mon, 26 Jun 2023 at 16:55, Ron <ronljohnsonjr@gmail.com> wrote:
On 6/26/23 08:08, David Steele wrote:
> 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.

Did I not have this problem because I restored to a different pg-path?

--
Born in Arizona, moved to Babylonia.


Вложения

В списке pgsql-admin по дате отправления:

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: Linux in-place upgrade
Следующее
От: David Steele
Дата:
Сообщение: Re: Postgresql Database cant start after restore using pgBackRest