Re: pgbackrest restore to new location? - Mailing list pgsql-general

From Stephen Frost
Subject Re: pgbackrest restore to new location?
Date
Msg-id 20190918020345.GO6962@tamriel.snowman.net
Whole thread Raw
In response to Re: pgbackrest restore to new location?  (Ron <ronljohnsonjr@gmail.com>)
Responses Re: pgbackrest restore to new location?
List pgsql-general
Greetings,

* Ron (ronljohnsonjr@gmail.com) wrote:
> On 9/17/19 6:48 AM, David Steele wrote:
> >On 9/17/19 7:23 AM, Luca Ferrari wrote:
> >>On Tue, Sep 17, 2019 at 12:00 PM Ron <ronljohnsonjr@gmail.com> wrote:
> >>>The real problem is that after doing that, "pg_ctl start -D
> >>>/path/to/new/data" fails with "PANIC: could not locate a valid checkpoint
> >>>record".
> >Sounds like backup_label is missing or has been deleted.
> >
> >The easiest way to restore to a new location is just to copy
> >pgbackrest.conf from the primary (or create a new one) with the same
> >stanza and then alter pg1-path in pgbackrest.conf or at the command line.
>
> That's what I did.  (Also, I opened Issue #839 in GitHub  All of the log
> files are attached there.)

Per the discussion in that issue, it looks like there's some issue with
the restore command failing to be able to pull the needed WAL from the
repo.

That said- it brings up a pretty serious issue that should be discussed,
and that's nuking this:

HINT:  If you are not restoring from a backup, try removing the file ".../backup_label".

That hint is absolutely wrong these days when many tools have been
updated to use the non-exclusive backup method and it just ends up
getting people into trouble and, worse, can result in them having
corrupted clusters.

I'll get a patch into the next commitfest to remove it.  The exclusive
method has been deprecated for quite a few releases and we should stop
giving bad advice on the assumption that people are using it.

Thanks,

Stephen

Attachment

pgsql-general by date:

Previous
From: Andreas Joseph Krogh
Date:
Subject: Re: PostgreSQL License
Next
From: Paul A Jungwirth
Date:
Subject: When does Postgres use binary I/O?