Re: Proper way to restore from a basebackup without the WAL-files?

From: Gustav Karlsson <gustav(dot)karlsson(at)bekk(dot)no>
To: John Scalia <jayknowsunix(at)gmail(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Proper way to restore from a basebackup without the WAL-files?
Date: 2015-12-15 18:14:17
Message-ID: AF7F5970-90A4-4DC0-AC31-F219020A5BD7@bekk.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Ok, thanks. That was actually what I ended up doing, but I get some warnings in the log. For example:

< 2015-12-15 00:00:58.206 CET >< >< >ERROR: failed to re-find parent key in index “myindex_idx" for deletion target page 101400
..

Is that to be expected?

Also, will the server be in a state where I can start replication to a slave? (given a fresh backup from the new timeline)

Regards,
Gustav

On Dec 15, 2015, at 6:47 PM, John Scalia <jayknowsunix(at)gmail(dot)com<mailto:jayknowsunix(at)gmail(dot)com>> wrote:

If you absolutely must use the pg_basebackup as your source and I'm assuming you have a tarball without any of WAL files, you could expand the tarball into you data directory, and use pg_resetxlog to "fool" the master into starting up. I only say "fool" as it just builds you a blank WAL file which this system can use as its integrity check and properly start.
--
Jay

On Tue, Dec 15, 2015 at 11:35 AM, Gustav Karlsson <gustav(dot)karlsson(at)bekk(dot)no<mailto:gustav(dot)karlsson(at)bekk(dot)no>> wrote:
Hi,

What is the proper way start a new master from a basebackup when you do not have the WAL-files?

We are using postgresql 9.4.

Regards,
Gustav Karlsson

--
Sent via pgsql-admin mailing list (pgsql-admin(at)postgresql(dot)org<mailto:pgsql-admin(at)postgresql(dot)org>)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Kevin Grittner 2015-12-15 18:19:37 Re: Proper way to restore from a basebackup without the WAL-files?
Previous Message John Scalia 2015-12-15 17:47:29 Re: Proper way to restore from a basebackup without the WAL-files?